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: 
Not applicable

Variant of YTD: Generating a table of YTX where X is from a list of dates ... How?

Hi,

I have a fact table of sales with dates that I would like to be able to use to generate a corresponding table showing the YTD values for each date.  This should be interactive and correspond to whatever possible selected dimension combination -- and be independent of the date selected. 

Q1: What should a set analysis expression look like for computing the year-to-date cummulative YTX value, where X is a static end date on the table?

Q2: Would the expression need to be different if dealing with weekly data vs monthly data?

Thanking in advance for your help.

As a specific example, I would like to generate a YTX table that looks like below (pivot table with a static KeepDate dimension defining the cummulative end date of X across?).  The Fact table contains dimensions Product, Region, and Date with the fact data being Sales.

ProductRegionAug 2011Sep 2011Oct 2011Nov 2011Dec 2011Jan 2012Feb 2012Mar 2012
ANorth40045050055060070140210
BNorth485460667271421
CNorth72819099108102030
AWest800900100011001200120240360

   I tried the following expressions but get a "-" value back.  Please help me understand where my problem in the expression is?  Thanks!

 

 

=

Sum({$
<
Date={"<=$(=KeepDate)"},
Year = Year(Date),
Quarter = ,
Month =
>
}
Sales)

4 Replies
Anonymous
Not applicable
Author

Hi,

   in expressino your adding year,that one is not required,if adding year means data will be filter based on year also.

Regards

Anonymous
Not applicable
Author

Hi,

   in expressino your adding year,that one is not required,if adding year means data will be filter based on year also.

Regards

Anonymous
Not applicable
Author

Hi,

   in expressino your adding year,that one is not required,if adding year means data will be filter based on year also.

Regards

Anonymous
Not applicable
Author

Hi,

   in expressino your adding year,that one is not required,if adding year means data will be filter based on year also.

Regards