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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
balajisj30
Creator
Creator

Use of less than in set analysis expression

Hi People

I have a requirement to build bar chart with sales of selected year and less than selected year.

I have used this expression to show previous year data,

=Sum({$<acc_period_year={"<acc_period_year"}>}bill_size)

But the expression gives null values. Please help me correct the expression.

Thanks

Balaji

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Try This

Sum({< acc_period_year = {"<=$(=max(acc_period_year)-1)"}>} bill_size)

regards

An Pham

View solution in original post

5 Replies
Anonymous
Not applicable

May be try this,

Sum({< acc_period_year = {"$(=max(acc_period_year)-1)"}>} bill_size)

balajisj30
Creator
Creator
Author

Thanks for the reply aparna.

your expression gives me sales value of only the previous year. But i want to display sales value of all the years below the selected year.

Anonymous
Not applicable

For that you can just subtract the max year by -2 for getting previous year sales

kenphamvn
Creator III
Creator III

Try This

Sum({< acc_period_year = {"<=$(=max(acc_period_year)-1)"}>} bill_size)

regards

An Pham

agigliotti
MVP
MVP

try this below:

Sum( {< acc_period_year = {"<$(=max(acc_period_year))"}>} bill_size)

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it