Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Are YTD calculations so difficult or am I missing something?

Hello to all qlikers,

In the attached file is a very simple sales report. My problem is that I cannot create an expression to calculate the YTD Sales.

The expression used is :


sum({$<Month={"<=$(=max(Month))"}, Week={"<=$(=max(Week))"}>}TOTAL<Market> Value)


I used the TOTAL<Market> modifier to instruct qlik to ignore the dimension values of Month & Week when calculating the sum,otherwise no matter what I declare in the set expression Month & Week are filtered on the row values.

The wrong part, I suppose, is the use of $(=max(Month)) and $(=max(Week)) to get the current Month & Week dimesion values for each row, but I don't know the correct way. When using just $(=(Month)) the sum returns always 0.

Any bright ideas?

Thanks

3 Replies
Not applicable
Author

Hello,

I think you can try this expression:

 

sum({<Month={'<=$(=max(Month))'}>} Sales)

It works for me!


Not applicable
Author

HI,

  use RangeSum and Above function

Hope it helps you

Regards,

Divya

Not applicable
Author

Take care: the set analysis will be computed only ONCE per chart

It means that you will get the same for all the rows. If you want to get a different set for a different YTD (one set of month per row), you need another technique.

See a doc I have written on that topic: http://community.qlik.com/docs/DOC-4821

Fabrice