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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD calculation issue

I am trying to calculate (YTD) from the monthly data.  Attached please find the sample Excel and .qvw.

I have State, Product, Tear and Month as dimensions and Sales as a measure.  I am trying to calculate YTD for each Product.

Expression is Sum(Sales).

In the .PNG file as you can see If I select Mar, the pivot table below does not give me Product A, because Product 'A' does not have any sales  in Mar.  But I still want to see the cumulative for Product 'A' from Jan, Feb in Mar

Please let me know how I can do that. I have already tried the <= Month syntax and it does not work.

7 Replies
tresesco
MVP
MVP

May be like attached sample.

PFA

amayuresh
Creator III
Creator III

Do you want output like below,

1.PNG

Expression: sum({<Month>}TOTAL <Product> Sales)

Not applicable
Author

NO I want the aggregation by State, by Product

Not applicable
Author

Its close . BUt when I select Product 'A' Mar becomes inactive.  I would like to see March available to select if I select Product 'A'

tresesco
MVP
MVP

Put some data for 'A' in March, you would be able to select March then.

Not applicable
Author

Hi Rehan Saeed, in your pivot table I take out the dimension 'Month' because if you put this dimension, Qlikview always shows you the product by month, by product and by state.

In your example in Excel, you have not two sales for one product in some month and state and year, so Qlikview will never do the 'agrupation' because has not something to agrupate.

Regards,

Agustín !

Not applicable
Author

BUt this is a actual problem.  I want March to be available even If I select Product, with no data in Mar.   So if it is a true YTD, then Mar will have the sum of (Jan and Feb).  Looks like I need some sort of a master calendar to drive the Year Month fields from

I tried but no solution yet yet