Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need to create an expression as (x-above(x))/above(x) in grid chart.

I need to create an expression as (x-above(x))/above(x) in grid chart.

Month Region Sales

Jan US 1000

Feb US 2000

Mar US 2020

Jan EU 1000

Feb EU 2000

Mar EU 2020

Jan AS 1000

Feb AS 2000

Mar AS 2020

IMPORTANT - X-Axis is Dimention is Month, Y-Axis is Region. The function above calculates above based on Region. I want it by Month. i.e. % Change in Sales by Month. It works if month is on y axis and region on x axis but I want month on x axis and region on y axis

2 Replies
israrkhan
Specialist II
Specialist II

You need to use Before() function, in this case...

Like = (Sale - Before(Sale)) / Before(Sale)

SunilChauhan
Champion
Champion

use in script


( (Sale - peek(Sale)) / peek(Sale))  as My expression


or


( (Sale - above(Sale)) / above(Sale))  in expression directly




Sunil Chauhan