The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |