Forum Discussion
Anonymous
4 years agoNot applicable
Count all non-zero or non-null values at a specific row
Hi all, I am very new to Power BI, but I am loving it already. I am using it to quickly represent and sift through a SQL database. We do a lot of sample testing and I want a way of indicating how...
v-chenwuz-msft
Community Support
4 years agoHi Anonymous ,
Have your problem been solved? if yes, please mark it as solution so that some one has the same preblem as you can find the answer quickly.
Maybe you can try this expression, but befor this you need create a Dimension table for your sample, in order to add one row named "blank/0".
Measure_count =
VAR _1 =
COUNTROWS ( FILTER ( 'Table', [Sample Rating (0-10)] > 0 ) )
VAR _2 =
COUNTROWS ( FILTER ( ALL ( 'Table' ), [Sample Rating (0-10)] <= 0 ) )
RETURN
IF ( SELECTEDVALUE ( 'Dimension'[Sample] ) = "Blank/0", _2, _1 )
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.