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: 
Anonymous
Not applicable

Set Analysis to Show % Change Automatically

I have a pivot table (pictured below) with 1 dimension, OppCreateMonth and one measure:

=sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])

QV334.PNG

Is there a way to have an expression that automatically calculates the percentage change between each cell as you move right? This would allow me to write ONE expression and then graph the percentage change between periods at any level.

Thank you,

- dave

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])/

Before(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])) - 1

or

=Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])/

After(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])) - 1

View solution in original post

7 Replies
sunny_talwar

May be this

=Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])/

Before(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])) - 1

or

=Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])/

After(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])) - 1

Anonymous
Not applicable
Author

Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])/

Before(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])) - 1

The BEFORE and AFTER commands are what I was missing.

Thanks as always Sunny

sunny_talwar

Before and After are function unique to Pivot table, so don't get noticed by a lot of people. Similarly, there is ColumnNo() function which works like RowNo() but with a pivoted dimension....

Anonymous
Not applicable
Author

Is there a similar function to Before and After in a straight table?

sunny_talwar

Above and Below

HirisH_V7
Master
Master

Hi,

Check this

IF((Above(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)]))-Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)]))<0,-(Above(Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)]))-Sum({<[Upsell ARR (converted)]={">0"}>}[Upsell ARR (converted)])),

(Above(Sum(Sales)/Sum(TOTAL Sales))-Sum(Sales)/Sum(TOTAL Sales)))

Using this in combo chart line expression, you can have line for only difference on bar chart.

Attached the sample QVW.

HTH,

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Ha thank you!