Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
marcus_steggall
Creator
Creator

YTD Set Analysis, Not Working

Hi team, happy friday

I am having a moment, with a simple calculation that doesn't seem to work.

As per attached qvw, you'll note i've a simple vMaxDate calculation basically trying to sum up previous months within the current year (this has worked previously, but for some reason not anymore)

The month column is working fine, but I'd expect the YTD column to sum up both Jan and Feb months.

So taking 2019, Feb is 6.5m and the total is 32.5 which should be in the YTD column

Can you see where I am going wrong?

Appreciate any advice, cheers

Labels (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Change in variable

vMaxDate  =date(max(Period_Start),'DD/MM/YYYY hh:mm:ss')

Expression- replace single quote with double

=SUM({<Year_YYYY={'$(vMaxYear)'},Period_Start={"<=$(vMaxDate)"}>}Revenue)

View solution in original post

2 Replies
tresesco
MVP
MVP

Change in variable

vMaxDate  =date(max(Period_Start),'DD/MM/YYYY hh:mm:ss')

Expression- replace single quote with double

=SUM({<Year_YYYY={'$(vMaxYear)'},Period_Start={"<=$(vMaxDate)"}>}Revenue)

marcus_steggall
Creator
Creator
Author

awesome, many thanks for that
always something so simple, left out or format
have a great weekend