Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
alex59800
Contributor II
Contributor II

Apply YTD rate to all months depending on month selection

Hello all

I have a DB with differents dimensions regrouped in a key as attached, trying to apply a YTD rate to all month depending on a selction, please see attached for DB and result i am looking for.

I tried by aggr but i can not figure out


Thanks a lot

Labels (1)
4 Replies
Chanty4u
MVP
MVP

Please share your expression 

Or may be try this 

Only(

  Total 

  Sum({<DateField = {"<=$(=vMaxDate)", ">=$(=YearStart($(vMaxDate)))"}>} Measure) 

  /

  Sum({<DateField = {"<=$(=vMaxDate)", ">=$(=YearStart($(vMaxDate)))"}>} DenominatorField)

)

alex59800
Contributor II
Contributor II
Author

I attached my example , do you see It ?
Best
alex59800
Contributor II
Contributor II
Author

Hello Chanty4u

 
 
 

I do not have expression working, just tested wo sucess. My example of pivot result and DB is attached if you have time

Best