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

qlik sense previous month cannot work

Hi,

I just made a qlik sense app for comparing with the previous month data with variables (attached) but it doesn't work.

the data set as following:

Date No Amount (attached as book1)

the measures formula as following:

Sum({$<SYear={"$(vPriorMonthYear)"},SMonth={"$(vPriorMonth)"}>}Amount)

are there any mistakes for the app?

thanks

2 Replies
tresesco
MVP
MVP

Set analysis can't be used in this case. Because, set analysis doesn't return row-wise value but once for a chart. You could try something like:

Above(Sum(Amount))

Gysbert_Wassenaar

The set analysis expression calculates its set at the chart level, not the row level. So even if you change your variables by putting an = sign in front of the expressions, i.e.  =Month(addmonths(max(Date),-1)) instead of Month(addmonths(max(Date),-1)), then you will only get a result for june. If you want to see results for each month for the previous month then you'll have to use another trick. For example using an expression like sum(aggr(rangesum(above(total sum({<SMonth=>}Amount),1,1)),SMonth))


talk is cheap, supply exceeds demand