Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

|NAME|ITEM |VALUE|
|john| pen | 4 |
|john| book | 7 |
|john| cup | 3 |
|Eric| pen | 9 |
|Eric| book | 8 |
|Eric| cup | 1 |

I want to create a field or column called "office" which equals the sum of the values of pen & book , that is, office = "pen + book"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

I created sample data like you have given. Now proceed this way

enter image description here

create a calculated field office with the following calculation

SUM(
IF [item] = "pen" OR [item] = "book" then [value] ELSE 0 END
)

Add this field to viz and your desired output is ready

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...