The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
I'm still bad at DAX and this problem seems simple but I've tried a few approachs and can't get it working.
I have a table, let's say Table1 and I have a column, let's say Score.
I need to find a way to show a percantage in a matrix visual on a dashboard of table1 of all nun-null values.
I got a dax expression to work with blank functions, but I had to convert every null value to a blank value to do this, and I have to make this measure 4 times over.
I got something to technically work, but it gives me values like 103% if I try to show the percantage as % of grand total.
Solved! Go to Solution.
Hi, @WBADAM03
You can try:
NonBlankPercentage =
DIVIDE (
COUNTROWS ( FILTER ( 'Table1', NOT ( ISBLANK ( 'Table1'[Score] ) ) ) ),
COUNTROWS ( 'Table1' )
)
Or:
NonBlankPercentage = DIVIDE( DISTINCTCOUNTNOBLANK(Table1[Score]), COUNTROWS('Table1'))
Does this solve your problem? If not, please provide example data.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey there, that's prettty similiar to what I used.
It didn't intentionally work because the way SQL returned my data was "null" and not blank. So the notblank function didn't work.
I ended up changing this to output blank values instead of a null text string, that allowed the nonblank function to work.
I'm going to mark your answer as the solution because it's what I ended up using.
Thanks
Hi, @WBADAM03
You can try:
NonBlankPercentage =
DIVIDE (
COUNTROWS ( FILTER ( 'Table1', NOT ( ISBLANK ( 'Table1'[Score] ) ) ) ),
COUNTROWS ( 'Table1' )
)
Or:
NonBlankPercentage = DIVIDE( DISTINCTCOUNTNOBLANK(Table1[Score]), COUNTROWS('Table1'))
Does this solve your problem? If not, please provide example data.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
21 | |
20 | |
11 | |
10 | |
7 |