Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help Set analysis

Hello Friends,

As I am trying to write a expression using set analysis but I am not getting any reslut.

The thing is I have two calculated fields from the script and trying to find a a sales.

eg:

=Sum({$<Disc={'Discount'}, MoreDisc={'ExtraDiscount'}>}[Sales])

and tryed like using If contion

=Sum(if(Disc='Discount',[Sales])) + Sum(If(MoreDisc='ExtraDiscount',[Sales]))

Thanks in advnce for your help

Regards

Chriss.

4 Replies
er_mohit
Master II
Master II

using aggr function like

aggr(rangesum({$(<Disc ='Discount'{${MoreDisc='ExtraDiscount'}>}},Sales)))

hope it helps you

jagan
Partner - Champion III
Partner - Champion III

Hi,

Please try below expression

=Sum({<Disc={'Discount'} > +  <MoreDisc={'ExtraDiscount'}>} [Sales])

Hope it helps you.

Regards,

Jagan.

Not applicable
Author

Hello Jegan and Mohit,

Thanks for your solutions,

Mohit: still your expression is not working for me, its showing error in as highlighted

aggr(rangesum({$(<Disc ='Discount'{${MoreDisc='ExtraDiscount'}>}},Sales)))

Regards

Chriss


shilpan
Partner Ambassador
Partner Ambassador

Try this

aggr(rangesum({$(<Disc ={'Discount'} + MoreDisc={'ExtraDiscount'}>},Sales)))

Hope it helps,