Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Could you please advise me how to count ZEROs by set analysis or if statement.?
I am using the below statement but both of them did not work.
=count({<Sale={"0"}>} Sale)
=Sum(If(Sale =0,1))
Kind Regards,
Farrukh
Hi Stefan,
I think its sorted. I used the below logic with set analysis, could you please advise me is it correct?
=Sum({$<Year=, Month=, Sale={"0"}, YearMonth={">=$(=Date(MonthStart(AddMonths(Min(SaleDate),-11)),'YYYYMM'))<=$(=Date(MonthStart(AddMonths(Max(SaleDate),0)),'YYYYMM'))"}>} Sale+1)
'Did not work' is not a good description of what you expect to see and what you got instead.
Could you describe your model, data, context of the expressions a bit more detailed?
For example, if Sale values are floating point values, they might differ slightly from zero.
Or are you looking for counting NULL?
Hi Stefan,
There are three dimensions
MonthYear
Region
Company
Expression
Sale with #,##0.000 format
Currently I'm only counting Zeros (0).
Farrukh
Is "Sale" a field in your data model? How do its values look like?
May be like this:
Sum(Aggr(If(Sale'sExpressionHere = 0, 1, 0), MonthYear, Region, Company))
No Luck yet with the above statement.
There are no zeros in the above image that you have posted
If Sale is a field in your data model and the above table shows its values, then there are no zero Sale values.
What do you expect to see?
Its a sample snapshot. there are zeros. in the selected month.