Skip to main content
Announcements
New: No-code data prep in Qlik Cloud Analytics™ TAKE A TOUR
cancel
Showing results for 
Search instead for 
Did you mean: 
lucpechali
Partner - Contributor III
Partner - Contributor III

Cumul Chart line with only total at end of line

Hi everybody,

I have a line chart with one dimension and two full cumulative measures.
I want to display only the last value in the graph.
I tried with Dual but it doesn't work with accumulation.

Here is what I have:

1.jpg

This is what I want to achieve:

2.jpg

Thank you in advance for your valuable help.

Labels (3)
1 Solution

Accepted Solutions
lucpechali
Partner - Contributor III
Partner - Contributor III
Author

A friend of mine found almost the solution :

 here is the set for the first line : 

dual(
pick(match(
rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),
max(total aggr(rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),[Mois])),
min(total aggr(if(len(minstring(EPRD_MONTANT))>0,rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno()))),[Mois]))
)+1,
'',
round(rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),1),
round(rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),1)
)
,rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno()))
)

with no cumul on the options and measure expression in number format

It works like a charm 

1.jpg

View solution in original post

9 Replies
eddyvargas
Contributor III
Contributor III

try the measure: rangesum( above( sum(Budget),0,rowno()) ) to cumulative for any expression

lucpechali
Partner - Contributor III
Partner - Contributor III
Author

Hi Eddyvargas,

I've already test that with no success.

Here's the result : 1.jpg

 

lucpechali
Partner - Contributor III
Partner - Contributor III
Author

And I changed the number format by Expression2.jpg

Clement15
Partner - Specialist
Partner - Specialist

Hello,

I used a formula like this.

Here 'Année' is my numeric dimension.

 

dual(
if( Année= '$(=max(Année))',
rangesum( above(Sum(FlagLancement),0,rowno())),
'')
,
rangesum( above( Sum(FlagLancement),0,rowno()))
)

We must not forget to put 'measure expression' since we are using a Dual. You can also modify the tooltip to have a result on each point otherwise the tooltip will be empty.

 

 

lucpechali
Partner - Contributor III
Partner - Contributor III
Author

Hi Clement15,

 

I did it like you said and I change to the Dimension Année to have a numeric dimension but I stil have all points in the graph 😞

2.jpg

 

Clement15
Partner - Specialist
Partner - Specialist

can you share your complete measure ?

eddyvargas
Contributor III
Contributor III

Why don't use set analysis:

Rangesum( above( sum({<Annee={$(=Max(Annee))}>} Budget),0,rowno()))

 

Other option is accumulate in script but the selections doesn't work:

New Field:

,If(Annee = Previous(Annee) ,RangeSum(Peek(Vl_Acumulado),Budget), Budget) as Vl_Acumulado

lucpechali
Partner - Contributor III
Partner - Contributor III
Author

Hi Clement15,

 

Here's my formula :

dual(
if( Année= '$(=max(Année))',
rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),
'')
,
rangesum( above( sum(EPRD_MONTANT)/1000,0,rowno()))
)

lucpechali
Partner - Contributor III
Partner - Contributor III
Author

A friend of mine found almost the solution :

 here is the set for the first line : 

dual(
pick(match(
rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),
max(total aggr(rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),[Mois])),
min(total aggr(if(len(minstring(EPRD_MONTANT))>0,rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno()))),[Mois]))
)+1,
'',
round(rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),1),
round(rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno())),1)
)
,rangesum( above(sum(EPRD_MONTANT)/1000,0,rowno()))
)

with no cumul on the options and measure expression in number format

It works like a charm 

1.jpg