Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello Users,
I have a large matrix set up and would like to set up a measure that calculates the total row percentage. ie:
I am taking 2 columns from 2 tables in calculation i.e-
| Table 1 Coulmn 1 Null ID | Table 2 Coulmn 2 Not Null ID | ||
| 1 | 1 | ||
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | 5 | ||
| Total count | 5 | 6 | |
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | |||
| Total Count | 10 | ||
| Total Count Null + Not Null | 15 | ||
| Null% | 0.333333333 | Total Null/Total Null+Not Null | |
| Not Null % | 0.666666667 | Not Null/Total Null+Not Null | |
@members please help
Thanks!
Solved! Go to Solution.
Hi @
You may try this solution.
1 Create a Calculated Table
Table = SELECTCOLUMNS( {"Total Count Null + Not Null","Null%","Not Null %"},"details",[Value])
2 Create a Measure
Count&Percent =
VAR numTable1 =
COUNTROWS ( 'Table 1' )
VAR numTable2 =
COUNTROWS ( 'Table 2' )
RETURN
SWITCH (
MAX ( 'Table'[details] ),
"Total Count Null + Not Null", numTable1 + numTable2,
"Null%",
numTable1 / ( numTable1 + numTable2 ),
"Not Null %",
numTable2 / ( numTable1 + numTable2 )
)
Then, build a Table visual like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hello @member @v-cazheng-msft can you please help me how i will get the average of mandatory null and not null value from the above data in same dax query or separate?
Hi @
You may try this solution.
1 Create a Calculated Table
Table = SELECTCOLUMNS( {"Total Count Null + Not Null","Null%","Not Null %"},"details",[Value])
2 Create a Measure
Count&Percent =
VAR numTable1 =
COUNTROWS ( 'Table 1' )
VAR numTable2 =
COUNTROWS ( 'Table 2' )
RETURN
SWITCH (
MAX ( 'Table'[details] ),
"Total Count Null + Not Null", numTable1 + numTable2,
"Null%",
numTable1 / ( numTable1 + numTable2 ),
"Not Null %",
numTable2 / ( numTable1 + numTable2 )
)
Then, build a Table visual like this.
Also, attached the pbix file as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
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.