Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am trying to create a bar graph that compares current month to prior month. I have used the expression below for Current Month and it seems to be showing the correct results:
Count( { $< [ASOF.autoCalendar.MonthRelNo]={0}, [ASOF.autoCalendar.YearsAgo]={0} > } [Customers] )
I then tried to use the below expression for Previous Month but it is showing 0.
Count( { $< [ASOF.autoCalendar.MonthRelNo]={1}, [ASOF.autoCalendar.YearsAgo]={1} > } [Customers] )
Any idea how I can make this work?
PS:I am using the enterprise version of Qlik Sense
Thank you!
hi,
previous month means -1 not 1,
ksrinivasan
Hi Ksrinivasan,
Many thanks for your response. I tried changing the 1 to -1 and I am getting an error in expression message. Perhaps you could assist me on alternative way to do the comparison that does not involve creating variables or using a load script. These methods are kind of difficult to implement on the enterprise version of Qlik. Thank you.
SM
hi,
try this
Sum({<Year= ,Month=, [Calendar Year/Month] = {">=$(=AddMonths(Max([Calendar Year/Month])), -1)<=$(=Max([Calendar Year/Month])) "}>} Amount)
ksrinivasan