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: 
arusanah
Creator II
Creator II

Logic help

I have a requirement . if user selects lets say 3 month from Jan- March , the expression should compare result of the current selection with prev 3 months  (OCT-DEC) and show up or down arrow.  how to write and expression for this. pls help

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

May be like this assuming we are comparing Sum of sales:

If(Sum(Sales)/Sum({<Date = {"$(='>=' & Date(AddMonths(Min(Date), -3), 'DateFieldFormatHere') & '<=' & Date(AddMonths(Max(Date), -3), 'DateFieldFormatHere'))"}, Month, Year, Week, MonthYear>}Sales) > 1, 'Sales Increased', 'Sales Decreased')