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

RangeAverage in Line Chart

Hello Team,

We have a Line Chart with 2 dimensions and Measure ,

a>Week Ending Date(x-axis)

b>Category(Represented by multiple lines)

c>Calculation for 4 week Rolling 

RangeAvg(Above (total sum(Sales) , 0 ,4))

The above works when i select a Category but for multiple categories it doesn't work .

While trying to investigate i know that we need to have sorted by brand and then week ending date but it's not working for line chart , the same works in Table chart.

Thanks,

Arvind

Labels (2)
1 Solution

Accepted Solutions
MayilVahanan

Hi @arvindjha2050 

Try like below

(Aggr(RangeAvg(Above(sum(Value), 0, 3)), Category, (Week_Ending_Date,(NUMERIC, ASCENDING))))

MayilVahanan_0-1613696261841.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

7 Replies
arvindjha2050
Creator
Creator
Author

Hello all,

Please assist

MayilVahanan

Hi @arvindjha2050 

May be try like below

Avg(Aggr(RangeAvg(Above(sum(amount), 0, RowNo())), Category, Week))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
arvindjha2050
Creator
Creator
Author

Hello @MayilVahanan 

Thanks for the response , the issue is still there

MayilVahanan

Hi @arvindjha2050 

can you share sample app or data?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
arvindjha2050
Creator
Creator
Author

Hello @MayilVahanan 

Thanks for the response , attached is sample data , the Table chart is the data we want to see in Line Chart.

 

The same can be done by having multiple measures one for each Category but it requires enhancement on inclusion of new Category in future.

MayilVahanan

Hi @arvindjha2050 

Try like below

(Aggr(RangeAvg(Above(sum(Value), 0, 3)), Category, (Week_Ending_Date,(NUMERIC, ASCENDING))))

MayilVahanan_0-1613696261841.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
arvindjha2050
Creator
Creator
Author

Thanks a lot @MayilVahanan