
Contributor III
2021-05-04
03:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sum(aggr with if
hello friends of the qlik comunntiy,
I want to calculate the following measure only when the if statement is true
sum(aggr(sum(Amount * Price),Month,Article,color) * aggr(avg([percentage),Month,Article,color))
But i do not get the right result, I tried something like this
sum(aggr(if( value ='YES',
sum(aggr(sum(Amount * Price),Month,Article,color) * aggr(avg([percentage),Month,Article,color))),,Month,Article,color))
but this does not work correctly. Does someone have any suggestions?
1,112 Views
1 Reply

MVP
2021-05-04
05:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
may be try like below
sum(aggr(sum({<value ={'YES'}>}Amount * Price)* avg({<value ={'YES'}>}[percentage)),Month,Article,color))
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Please close the thread by marking correct answer & give likes if you like the post.
1,074 Views
