Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I’m trying to replace formula with « if » by set analysis
I have for an entity some days and each days are flagged « 0 » or « 1 ». If one of selected days is “1”, I will consider all selected days as “1”
Following formula with "IF" works :
=if(sum(FLAG)= 0, Sum(CaNetTtc_N),0)
Cela reviendrait a agréger une dimension dans le set analysis, ce qui ne fonctionne évidement pas :
That would be an aggregated dimension in the set analysis, which clearly does not work:
=sum({$<sum(FLAG)={0}>}CaNetTtc_N)
Thanks for your help
Romain
hi,
try below
=sum({<FLAG={0}>} CaNetTtc_N)
Regards
ASHFAQ
Hi,
thanks for your reply, i've already try this formula, and only display the days with 0.
For exemple :
DAY | FLAG | CA |
28/06/2014 0 50
29/06/2014 0 100
30/06/2014 1 300
With =if(sum(FLAG)= 0, Sum(CaNetTtc_N),0) => 0 (Result is OK)
With =sum({<FLAG={0} CaNetTtc_N>})=> 150 (result KO)
If one selected day is flagged 1, i want to consider all selected days as 1 so the result would be = 0.
Romain
sum({$<"=$(sum(FLAG))"={0}>}CaNetTtc_N)
DAY | FLAG | CA |
28/06/2014 0 50
29/06/2014 0 100
30/06/2014 1 300
With =sum({$<"=$(sum(FLAG))"={0}>}CaNetTtc_N) => 450 (Result is KO)
I think, the formula doesn't work.
Thanks for your reply
Romain
Hi,
If I understand you want to obtain 0 if at least a flag is equal to zero?
In this case, have you try the following expression:
=min(FLAG)*sum(CaNetTtc_N)
Regards,
Vincent
Sorry Vincent, i was wrong.
If one one day in my selection is flagged 1, i want to consider all selected days as 1 so the result would be = 0.
So, it's the opposite?
=(1-max(FLAG))*sum(CaNetTtc_N)
Regards,
Vincent