Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, can anyone guide me an efficient BI DAX Query to find percentage of only two categories like in my case I want to take percentage of 1 and 2 out of 1-5 scale rating ignoring the missing values in the column, rest all data set to be included.
e.g.: Poor Feedback % = 1(category) + 2(category) / Out of all data set "Excluding missing values" * 100
Below is the screenshot of my likert scale and column name.
Solved! Go to Solution.
You can use something like:
Poor Feedback% =
DIVIDE (
CALCULATE ( COUNTROWS ( 'Table_Name' ), [BL_Numeric] IN { 1, 2 } ),
CALCULATE ( COUNTROWS ( 'Table_Name' ), [BL_Numeric] <> BLANK () )
) * 100
You can use something like:
Poor Feedback% =
DIVIDE (
CALCULATE ( COUNTROWS ( 'Table_Name' ), [BL_Numeric] IN { 1, 2 } ),
CALCULATE ( COUNTROWS ( 'Table_Name' ), [BL_Numeric] <> BLANK () )
) * 100
Hi @Mohammad_Refaei i tried with your query but value is exceding above thousands. As it should be not greater then 100% i think something is worng while evaluating the expression.
Thanks @Mohammad_Refaei for the guidance. Can you please explain the usage of "<>BLANK ( )" in the second line?
Most welcome Hassan.... The division by <> BLANK() beacause you want to ignore missing values.
If the measure is reporting high values then we can be more strict and ignore any other filters like this:
Poor Feedback% =
DIVIDE (
CALCULATE ( COUNTROWS ( ALL('Table_Name') ), [BL_Numeric] IN { 1, 2 } ),
CALCULATE ( COUNTROWS ( ALL('Table_Name') ), [BL_Numeric] <> BLANK () )
) * 100
@Mohammad_Refaei thanks alot for your time and sharing tips. It's working perectly fine now!
@HassanMoosa , Measure in one of three ways
divide(countrows(filter(Table, Table[Category] in {1,2})), countrows(filter(Table, nor(isblank(Table[Category])))))
divide(countrows(filter(Table, Table[Category] in {1,2})), countrows(filter(allselected(Table), nor(isblank(Table[Category])))))
divide(countrows(filter(allselected(Table), Table[Category] in {1,2})), countrows(filter(allselected(Table), nor(isblank(Table[Category])))))
Hi @amitchandak thanks for your inputs. I tried with your last query but I am facing error that "nor" is not a function. I tried with false e.g.:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |