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: 
Not applicable

How can read last 8 months data

I Want to display a last 8 months data in the expression using SET analysis.


Labels (1)
1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Write like

=Sum({$<MonthYear = {">$(=num(AddMonths(today(),-9))) <=$(=Num(addmonths(today(),-1)))"}>} YourSalesValue)

View solution in original post

5 Replies
its_anandrjs
Champion III
Champion III

Write like

=Sum({$<MonthYear = {">$(=num(AddMonths(today(),-9))) <=$(=Num(addmonths(today(),-1)))"}>} YourSalesValue)

Not applicable
Author

Can i used it for any Dimension like months and monthname.

its_anandrjs
Champion III
Champion III

Yes you can use it for any expression or dimension.

Not applicable
Author

I want to use variable in place of the formula in expression.

its_anandrjs
Champion III
Champion III

Create two variables like

vStart  =num(AddMonths(today(),-9))

vEnd =Num(addmonths(today(),-1))

And then use script like

=Sum({$<MonthYear = {">$(vStart) <=$(vEnd)"}>} Sales)