Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis

Hi All,

I am facing an issue with set as I am trying to create MTD by using below expression:

(sum({<Month_No_SM1={"$(=num(month(max(Date_SM1))))"},Year_SM1={"$(=max(Year_SM1))"},Date_SM1={"<$(=max(Date_SM1))"}>}QUANTITY_SM1)

-

sum({<Month_No_SM1={"$(=num(month(max(Date_SM1))))"},Year_SM1={"$(=max(Year_SM1)-1)"},Date_SM1={"<=$(=date((AddYears(max(Date_SM1),-1)),'MM/DD/YYYY'))"}>}QUANTITY_SM1))

/

sum({<Month_No_SM1={"$(=num(month(max(Date_SM1))))"},Year_SM1={"$(=max(Year_SM1)-1)"},Date_SM1={"<=$(=date((AddYears(max(Date_SM1),-1)),'MM/DD/YYYY'))"}>}QUANTITY_SM1)

and its picking up the wrong dates.

Data I have till 24 Sep 2014 however its giving me the figures of 23 Current Year and 24 for last year.

Can anyone help?

Thanks

0 Replies