Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator
Creator

Getting the sum of a grouping

I am having trouble with a (seemingly) simple sum issue.

I have a data structure like this:

ID Item Cost
0001 AAA 200
0001 AAA 400
0001 AAA 300
0002 BBB

 

 

100
0002 BBB

100

When I do a =Sum(Cost), it gives me the line item number (the same as the cost), but I need to sum by the ID so 0001 has a total cost of 900, 0002 has a total cost of 200, etc.

I am sure I am overthinking something

Labels (1)
2 Replies
AshutoshBhumkar
Partner
Partner

Hello,

If the ID and Item is same then your value should be 900 for ID 0001, Item AAA.

Sum will give segregated values only if there are different Items under one ID.

Your straight table should have below data:

Dimensions : ID, Item

Measure : Sum(Cost)

 

Thanls,

Ashutosh

jlg
Contributor II
Contributor II

If I have understood the question correctly, try:

SUM(Total <ID> Cost)