Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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')