Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
the heading might be confusing, apologies here. There is a problem I am facing (see also attached QVW):
I am using expression like this in my straight table:
=if(Only(Country) = vAlternativeCountry,
Sum(Sales), null())
variable vAlternativeCountry contains: =Only({<City=$::City>}Country)
Also straight table is in Alternate state A.
The problem is that I get null for total.
I tried to use dimensionality () <> 0, but couldn't make it work.
Can someone help me to get the total there?
[Basically the table will show all cities of the country, when I select one city.]
[I kinda don't want to use p in set analysis]
Thank you for any help.
Try this as expression
Sum({<Country = p({$}), City>}Sales)
sum(aggr(if( Only( Country) = vAlternativeCountry,Sum( Sales), null()),City))