Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sprqlikview
Contributor II
Contributor II

Details for current year but not for previous year

I created a PIVOT table where I show each article as columns and then Revenue split by Year (2015 & 2014) and Branch (V1, V2,...V10).

I now want to show details for 2015 but for 2014 I only want to show the total per article. Furthermore I want to show the different between current year and previous year.

How do I best do that?

3 Replies
arulsettu
Master III
Master III

hi

try this

for current year sum({<year={$(=max(year)}>}Revenume)

previous year sum({<year={$(=max(year)-1}>}Revenume)

difference sum({<year={$(=max(year)}>}Revenume)-sum({<year={$(=max(year)-1}>}Revenume)

sprqlikview
Contributor II
Contributor II
Author

First problem I could solve by saying that if Year = Previous year it should not show me the Branch Name but "Total".

The problem is that I have a split between years & Branches and don't know how to only have this split for the Totals but not for the difference where I should have the sum of 2015+2014.

So in the end I should get the following when I select only V7&V8. Split by Branch for CY, Total for PY and Total Difference

                                       |     2015      |     2014    |    

Article-Nr.   |  Article       |  V7  | V8   |     Total    |     Difference   |

15000          |   Egg           |   88  | 0      |      147     |          -59          |

Currently I have the following

arulsettu
Master III
Master III

try this

sum({<year={'2015','2014'}>}Revenume)