Forum Discussion
Anonymous
8 years agoNot applicable
Need count for matrix non zero values
Hi Team,
Please find the screenshot below, the visual used is matrix. Now I nee dto have count of all non zero values as mentioned in figure, Kindly help . Thsi can be another visual or part of same table.
Thanks
Swapnil
Anonymous,
You may refer to the following measure.
Measure = IF ( HASONEVALUE ( Table1[Date] ), SUM ( Table1[Qty] ), COUNTROWS ( FILTER ( VALUES ( Table1[Date] ), CALCULATE ( SUM ( Table1[Qty] ) ) > 0 ) ) )
6 Replies
- ChrisMendozaResident Rockstar
hello Anonymous,
Try something like:
as a calculated column:
IF Statement = IF(Table2[Qty]<=0,BLANK(),1)
as a measure:
Count IFs = COUNT(Table2[IF Statement])
// SUM should work as well.- AnonymousNot applicable
But if I want to put same in same matrix as last column then how would I do it ?As If I put this in column it creates multiple columns with same value
- ChrisMendozaResident Rockstar
Yeah, that's why it's in another visual per your statement where you said it can be in another visual.
- v-chuncz-msftCommunity Support
Anonymous,
You may refer to the following measure.
Measure = IF ( HASONEVALUE ( Table1[Date] ), SUM ( Table1[Qty] ), COUNTROWS ( FILTER ( VALUES ( Table1[Date] ), CALCULATE ( SUM ( Table1[Qty] ) ) > 0 ) ) )