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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

sum up all sales before current month

I have recent 3 years sales data, I'm trying to sum up all sales before August (current month) in these years. My function is:

Sum({<Month={"<(=month(today()))"}>}Sales)

The result is 0, I have no idea what's wrong. Any ideas?

Thanks in advance!!

23 Replies
wanyunyang
Creator III
Creator III
Author

Because those two comments both only count one month, and my description says count all months before current month, which is seven for now. I thought you guys were just testing numeric comparison with only one month, Andrey also mentioned try his expression for testing, so I replied yes it works.

william_fu
Creator II
Creator II

Then please refer to Sunny's comment on creating a numeric month field.

My guess is that using only one month in the set analysis, it can correctly verify the condition ("Aug" = "Aug")

But if you try using <= or <, there's no way for the set expression to know that "Jan" < "Aug", for example.

If you use a numeric month field, it should work.

wanyunyang
Creator III
Creator III
Author

Thank you Sunny.

wanyunyang
Creator III
Creator III
Author

Thanks