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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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

1 Reply
sunny_talwar

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')