Forum Discussion
Distinct Count
- 6 years ago
Hi Pedro
Start afresh and ignore the previous DAX measures for WOI < 2. Add 2 new measures:
WOI < 2 (hidden) = if([WOI (8W)] > 0 && [WOI (8W)] < 2,1,0)
WOI < 2 = SUMX ( VALUES ( SO_INV_LOJA[Nome da Loja] ), CALCULATE ( [WOI < 2 (hidden)] ) )
For some reason I can't add a screen shot so will try doing that in another reply.
The hidden measure calculates WOI but only in the context where you have the Nome da Loja. If you look at the total it shows as zero because the total WOIis 8.51.
The visible WOI < 2 measure shows the total correctly because it is forcing the calculation to be applied at a grouped level.
I found the answer here: https://brentgreenwood.blogspot.com/2012/12/dax-groupers-summarize-and-aggxvalues.html
Thanks
Brian
- 6 years ago
screen shot:
Hi Pedro
Start afresh and ignore the previous DAX measures for WOI < 2. Add 2 new measures:
WOI < 2 (hidden) = if([WOI (8W)] > 0 && [WOI (8W)] < 2,1,0)
WOI < 2 = SUMX ( VALUES ( SO_INV_LOJA[Nome da Loja] ), CALCULATE ( [WOI < 2 (hidden)] ) )
For some reason I can't add a screen shot so will try doing that in another reply.
The hidden measure calculates WOI but only in the context where you have the Nome da Loja. If you look at the total it shows as zero because the total WOIis 8.51.
The visible WOI < 2 measure shows the total correctly because it is forcing the calculation to be applied at a grouped level.
I found the answer here: https://brentgreenwood.blogspot.com/2012/12/dax-groupers-summarize-and-aggxvalues.html
Thanks
Brian