Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
annick
Contributor III
Contributor III

RangeSum with 2 dimensions

Hello,

I have the following dataset:

sales:
LOAD
* Inline [
DCP, Network, NbSales
0, Africa, 1
1, Africa, 1
2, Africa, 1
3, Africa, 1
0, Europe, 2
1, Europe, 2
2, Europe, 2
3, Europe, 2
];

 

I would like to display the cumulated NbSales by DCP and Network .

I am using the following line chart:

annick_1-1712827770535.png

 

with the measure "Cumulated Sales" defined as follows:

Aggr(RangeSum(Above(Sum(NbSales), 0, RowNo())), DCP, Network)

 

The above does not work, as I obtain the following result:

annick_2-1712827874744.png

I would like to see:

annick_0-1712827689032.png

 

Could you please help me fix the measure "Cumulated Sales" 

Many thanks

Kind regards

 

 

 

 

Labels (1)
2 Replies
Gabbar
Specialist
Specialist

Add the required Dimensions and add your measure, After that into measure setting use Modifier -> Accumulator and set the amount of preceding steps. 


While if you are having only one Dimension in your chart how do you wish it to show when aggregating on 2 dimensions.

Also please update the picture to show the dimension clearly in the chart you pasted.

annick
Contributor III
Contributor III
Author

Hello,

 

I use this chart and 2 dimensions:

annick_0-1712842479222.png

 

I use this measure:

Aggr(RangeSum(Above(Sum(NbSales), 0, RowNo())), DCP, Network)

annick_1-1712842579037.png

I obtain:

annick_2-1712842682626.png

 

The amounts are not cumulated. 

 

I would prefer to avoid using the setting "Modifier -> Accumulation" . Is there a way to modify the above expression Aggr(RangeSum(Above(Sum(NbSales), 0, RowNo())), DCP, Network) in order to see the cumulated sales?

 

Thanks a lot

Annick