Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Moving Totals to a variable

Hello,

I have a fully working chart with two results, Wins and Lost. the values are correct and my problem is

that I would like to have the Total in an variable so I can uset it in an KPI-object .sshot-7.png

sshot-9.png

The calculation for the Win is:

sshot-9.png

When I put this into a variable and show it in the KPI-object it shows 0.

kindly

Håkan

1 Solution

Accepted Solutions
sunny_talwar

Just one for the whole calculation

Sum(Aggr(

If(Sum({$<$(vSetRolling12),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) >= $(vOmsG) and

Sum({$<$(vSetPreviousMonth),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) < $(vOmsGMonth) and

Sum({$<$(vSetMTD),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) >= $(vOmsGMonth) ,1,0),

ChartDimensionHere))

View solution in original post

5 Replies
MK9885
Master II
Master II

do not use = before your expression.

Just start with If condition.

sunny_talwar

You might need to add Sum(Aggr()) function

Sum(Aggr(

YourExpressionForWin, YourChartDimensions))

Not applicable
Author

Good morning,

how shall I place aggr(), for each sum or one for the whole calculation?

=if ( Sum({$<$(vSetRolling12),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) >= $(vOmsG) and

Sum({$<$(vSetPreviousMonth),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) < $(vOmsGMonth) and

Sum({$<$(vSetMTD),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) >= $(vOmsGMonth) ,1,0)

sunny_talwar

Just one for the whole calculation

Sum(Aggr(

If(Sum({$<$(vSetRolling12),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) >= $(vOmsG) and

Sum({$<$(vSetPreviousMonth),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) < $(vOmsGMonth) and

Sum({$<$(vSetMTD),[BudgetSegment]={"Glas"}>} $(vNettoFörs)) >= $(vOmsGMonth) ,1,0),

ChartDimensionHere))

Not applicable
Author

Thanks for your helpfullness and pation.

Håkan