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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
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
tresB
Champion III
Champion III

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
Partner - Champion III
Partner - Champion III

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