Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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')