
How to get the TOTAL from a Top3 in a Straight Table
Roland Kunle Nov 3, 2010 5:26 PM (in response to EduardoGonzalez )Hi Eduardo,
did you check properties > dimensions > "Suppress when values is Null" ?
Regards, Roland

How to get the TOTAL from a Top3 in a Straight Table
EduardoGonzalez Nov 4, 2010 3:56 AM (in response to Roland Kunle )Hi,
Yes, but the Only Dimension is 'HOTEL' and never is null.
Thanks a lot

How to get the TOTAL from a Top3 in a Straight Table
John Witherspoon Nov 5, 2010 7:56 PM (in response to EduardoGonzalez )Perhaps this to replace your current Media2 expression?
if(dimensionality()=0,column(2)/column(1),YourCurrentMedia2Expression)
I'm not certain the dimensionality of the total row will be 0, but I think it is. If so, then it's basically saying "if you're on the total row, calculate it by dividing the second column by the first column, otherwise calculate the value normally".
As for not seeing hotels A and B, rather than suppressing when the dimension is null, I believe you need to suppress when the expressions are null. Properties > presentation > suppress zero values and suppress missing.



How to get the TOTAL from a Top3 in a Straight Table
EduardoGonzalez Nov 8, 2010 5:27 AM (in response to EduardoGonzalez )Hi everyone,
Thanks a lot for your answers.
I think I´ve solved the problem.
The big problem was that I can´t get a 'Total Expression' (in Total Mode) for the field 'Media2' if some of the Expresions I use in 'Media2' doesn´t have a right value in his 'Total Expression'.
The 'Media2' Expression was something like this [Precio]/[Noches], but I dind´t know how to get a right value in TOTALS for this fields.
So now I have been able to get a right value in all Total Expressions for all my fields using the function aggr.
Now I have in Expressions [Precio] and [Noches] something like this:
SUM(
aggr(
if(
rank(sum(Noches),4)<=3
,sum(Noches)
)
, [HOTEL])
)So I can use the Total Expressions in Total Mode without problems.
I attach my example.
Thanks a lot

Top3TotalExpressions.qvw 121.8 K
