Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
zhaohaifeng
Contributor III
Contributor III

Sum with duplicate data

Hi All,

For some case :

Sum({<A={CHC}>} VALUE ) + Sum({<A={GEM}>} VALUE )  are not matched with Sum({<A={CHC,GEM}>} VALUE )  as the duplicate data, my question was that if we want to calculate all the value not carethe duplicate like Sum({<A={CHC}>} VALUE ) + Sum({<A={GEM}>} VALUE ) , how can we edit the expression dont used this way one + one. Thanks for your time!

 

Best Regards,

Haifeng

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

You can try this as your expression

Sum(Aggr(Sum(value), AA, org))

View solution in original post

5 Replies
bramkn
Partner - Specialist
Partner - Specialist

maybe Sum({<A={CHC}>+<A={GEM}>} VALUE )
zhaohaifeng
Contributor III
Contributor III
Author

Hi,

 

If we need to calculate all the items, in this way we need to write many set analysis, A=CHC + A=GEM+A=AAA+ and so on, so do you know any other ways ? Thanks.

 

Best Regards,

Haifeng

sunny_talwar

AFAIK Sum({<A={CHC}>} VALUE ) + Sum({<A={GEM}>} VALUE) will always equal Sum({<A={CHC,GEM}>} VALUE)... can you share a scenario where they are not?

zhaohaifeng
Contributor III
Contributor III
Author

Thanks .

 

See attached file, the sum value we want to show 700, not 600. Can you share some ideas? Thanks.

 

Best Regards,

Haifeng

sunny_talwar

You can try this as your expression

Sum(Aggr(Sum(value), AA, org))