Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Before function in line chart

@hi,

I am trying to create expression using 2 dimensions in line chart.

For Example my 2 dimenions are MonthYear ,code

I want current month sales for the below data,consider A,B,C as number of sales and table below is the result table after calculating the sales of (current month)/(Previous month and Previous code). I achieved this in  pivot table expression

sum(Sales)/above(before(sum(Sales)))   but I need this in Line chart.

 

Capture1.JPG

Please help me with this.

Thanks in advance.

2 Replies
sunny_talwar

Try this in your chart

Sum(Sales)/Aggr(Above(Aggr(Above(Sum(Sales)), MonthYear, code), code, MonthYear)