Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Qlik Cloud Maintenance is scheduled between March 27-30. Visit Qlik Cloud Status page for more details.
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

How to convert YTD values to quarterly values

I have a data which is ordered based on Group, Year, Q and looks like this ( I left the Value YTD column unfilled here):

Year          Q     Group     Value YTD

2022        1          A       

2022        2          A

2021        4          B

2022        1          B

2022        2          B

2022        2          C

2021        4          D

2022        1          D

2022        2          D


I'm trying to get the YTD values translated to quarterly values based on the groups. Here is what I have tried:

if(Previous(Group) = Group, if(Previous(Year) = Year, "Year YTD" - Peek ("Year YTD"),  "Year YTD" ),  "Year YTD" ) as "Value quarterly"

However, I get the wrong values and I don't understand why. What caveats my thinking has and is there another way to do this?


Labels (2)
0 Replies