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: 
dennysetiawan
Partner - Contributor III
Partner - Contributor III

Set Analysis question

Hi community,

I have an expression with set analysis like this:

sum({<[BRAND]={"=RANK(SUM({<[SALES]-={0}>}-[SALES]),4)<=10"}>}[SALES])

Then I want to put this analysis on that expression:

MONTHYEAR={'$(vMTD)'}

where vMTD =DATE(ADDMONTHS(NOW(),-1),'MMM-YYYY')

Can anyone help me what is the correct script of set analysis to cover the two expressions above?

Thank you

1 Solution

Accepted Solutions
sunny_talwar

May be one of these:

Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}>}-[SALES]), 4) <= 10"}, MONTHYEAR={'$(vMTD)'}>}[SALES])

or

Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}, MONTHYEAR={'$(vMTD)'}>}-[SALES]), 4) <= 10"}, MONTHYEAR={'$(vMTD)'}>}[SALES])

or

Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}, MONTHYEAR={'$(vMTD)'}>}-[SALES]), 4) <= 10"}>}[SALES])

View solution in original post

4 Replies
sushil353
Master II
Master II

Try:

sum({<[BRAND]={"=RANK(SUM({<[SALES]-={0}>}-[SALES]),4)<=10"},MONTHYEAR={'$(vMTD)'}>}[SALES])

sunny_talwar

May be one of these:

Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}>}-[SALES]), 4) <= 10"}, MONTHYEAR={'$(vMTD)'}>}[SALES])

or

Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}, MONTHYEAR={'$(vMTD)'}>}-[SALES]), 4) <= 10"}, MONTHYEAR={'$(vMTD)'}>}[SALES])

or

Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}, MONTHYEAR={'$(vMTD)'}>}-[SALES]), 4) <= 10"}>}[SALES])

susovan
Partner - Specialist
Partner - Specialist

Try this expression,

sum({<[BRAND]={"=RANK(SUM({<[SALES]-={0}>}-[SALES]),4)<=10",MONTHYEAR={"=$(vMTD)"}>}[SALES])

Warm Regards,
Susovan
dennysetiawan
Partner - Contributor III
Partner - Contributor III
Author

Thank you Sunny.

The best answer is Sum({<[BRAND] = {"=Rank(Sum({<[SALES]-={0}, MONTHYEAR={'$(vMTD)'}>}-[SALES]), 4) <= 10"},MONTHYEAR={'$(vMTD)'}>}[SALES])