Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to Sum DATA if greater than 0, else display $0
Basic algorithm: If (Sum(DATA)>0, Sum(DATA), 0)
Using something like this:
Sum({<[CyclePeriod]=>}DATA), [ClientId],[ClientName],[Account],[CyclePeriod])
I ended up doing it like thig:
If (Sum( {< [Billing Cycle]={">=$(=Max([Billing Cycle])-2)<=$(=Max([Billing Cycle]))"} >} DATA) <>0, Sum( {< [Billing Cycle]={">=$(=Max([Billing Cycle])-2)<=$(=Max([Billing Cycle]))"} >} DATA)
You already have the solution
if(Sum({<[CyclePeriod]=>}DATA)>0,Sum({<[CyclePeriod]=>}DATA),0)
Are you doing any aggregations using AGGR()
Can you provide more details such as dimensions used in chart and copy paste your actual expression
I think I need to do aggregations in the solution - by [ClientId],[ClientName],[Account],[CyclePeriod]
As I have multiple clients, accounts and Month/Year periods for my pivot table
Something like this but it's not giving a 0 when there is no value (DATA) for a given period, client, account:
=If (sum(aggr(sum({<[CyclePeriod]=>}DATA),[ClientId],[ClientName],[Account],[CyclePeriod])) > 0,
sum(aggr(sum({<[CyclePeriod]=>}DATA),[ClientId],[ClientName],[Account],[CyclePeriod])), 0)
I ended up doing it like thig:
If (Sum( {< [Billing Cycle]={">=$(=Max([Billing Cycle])-2)<=$(=Max([Billing Cycle]))"} >} DATA) <>0, Sum( {< [Billing Cycle]={">=$(=Max([Billing Cycle])-2)<=$(=Max([Billing Cycle]))"} >} DATA)