Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

marcus_steggall
Contributor

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
MVP
MVP

Re: YTD Set Analysis, Not Working

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)

2 Replies
MVP
MVP

Re: YTD Set Analysis, Not Working

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)

Highlighted
marcus_steggall
Contributor

Re: YTD Set Analysis, Not Working

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