Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Felipe02
Contributor III
Contributor III

Field does not return the total

Guys, I built an expression and I'm using it in a table, but it doesn't return the total values:

Felipe02_0-1689711962909.png

Below is the measurement expression, it comes from Qlikview but when I put it in the table in sense it doesn't return the total: 
rangesum(sum(Valor)-
if(sum(Valor)>0,aggr(above(if(sum(Valor)=0,Above(sum(Valor)), sum(Valor) )), (Data, (NUMERIC, ASCENDING))),-0.001) )

 

Labels (4)
3 Replies
Vegar
MVP
MVP

It might be your aggr() that is returning null when calculated over multiple [Data] values.

Try:

rangesum(sum(Valor)-

if(sum(Valor)>0, sum( aggr(above(if(sum(Valor)=0,Above(sum(Valor)), sum(Valor) )), (Data, (NUMERIC, ASCENDING))) ) ,-0.001) )

Felipe02
Contributor III
Contributor III
Author

Thank you my friend

The values ​​​​appeared in total my problem is solved ! 

 

 

Undercover
Contributor II
Contributor II

Das Problem ist nicht, dass ein Teilergebnis der aggr() Nullwerte ausgibt. Eine aggr() kann man sich als eine Reihe von Ergebnissen vorstellen. Diese werden entsprechend für jede einzelne Zeile in der Tabelle berechnet. Da diese Formel selbst keine Gesamtformel darstellt, kann entsprechend kein Gesamtergebnis dargestellt werden. Ähnlich würde es sich verhalten, wenn man in einem Textfeld eine Dimension darstellen würde, die mehrere Werte enthält. Eine umschließende Formel wäre hier notwendig, um diese darzustellen (bspw. Concat(...)). Bei der Berechnung in Ihrem Beispiel wird durch ein sum() erst ein distinktes Ergebnis sichtbar.