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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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.

Labels (1)
2 Replies
sunny_talwar
MVP
MVP

Try this in your chart

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

sunny_talwar
MVP
MVP