This content has been marked as final. Show 2 replies
I'm facing a problem on an expression. I need to verify if there is only one month selected or not. I have a pivot table and an expression like this one:
If(Sum(Quantity) =0 ,'', // Here I'm sure the dimension will show even there is no Quantity
If(not Match(Function,'A','=') ,iF(ISNULL(Quantity),0,Quantity),
If(((Month=1) or ((aggr(Count(distinct Month), Year, LineCode))=1)) and Function='A',Quantity,
If((Month=12 or (aggr(Count(distinct Month), Year, LineCode))=1) and Function='=', Quantity,
I'm not getting the expect result. This (aggr(Count(distinct Month), Year, LineCode)) does not work when used in the above expression but, if I use just it as another expression, the result is OK.
Does anybody can help me?