Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
palo173
Contributor II
Contributor II

Cumulative Percentage - Line Chart

I have a line chart with monthly values (percentages). I try to make the same chart, but with cumulative values but without success. Could you help me with modification my expression?

Expression and chart below are for monthly values. There are no all carmakers (I have active filter for carmakers because of clear arrangement), but percentage is counting from all. 
vSetCY = current year
#Reg = number of sales
Fakt=dimension

Thank you

*let me know, if everything is clear or obscure...

palo173_0-1639399519594.png
Sum({< Fakt = {'Def'}, $(vSetCY) >}#Reg) / Sum({< Fakt = {'Def'}, $(vSetCY), [Carmaker]= >}TOTAL <Month> #Reg)

palo173_1-1639399599166.png

 

I made an attempt to do it, but this is only cumulative without percentage:

=(Aggr(RangeSum(Above(Sum({< Fakt = {'Def'}, $(vSetCY), [Carmaker]= >}#Reg), 0, RowNo())), [Carmaker], Month))

palo173_0-1639400902684.png

 

Labels (4)
1 Solution

Accepted Solutions
palo173
Contributor II
Contributor II
Author

I get it. It works for me perfectly:

aggr(RangeSum(Above(Sum({< Fakt = {'Def'}, $(vSetCY) >}#Reg), 0, RowNo())), Fakt, [Carmaker], Month) / aggr(RangeSum(Above(Sum({< Fakt = {'Def'}, $(vSetCY), [Carmaker] >}Total <Month> #Reg), 0, RowNo())), [Carmaker], Month)

 

View solution in original post

1 Reply
palo173
Contributor II
Contributor II
Author

I get it. It works for me perfectly:

aggr(RangeSum(Above(Sum({< Fakt = {'Def'}, $(vSetCY) >}#Reg), 0, RowNo())), Fakt, [Carmaker], Month) / aggr(RangeSum(Above(Sum({< Fakt = {'Def'}, $(vSetCY), [Carmaker] >}Total <Month> #Reg), 0, RowNo())), [Carmaker], Month)