March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dears....I have a excel database and ther are some cells not filled. From Power BI, I need to know the count of those blank cells based on which column the blank cells is available. Please advise for the DAX query for this
For Eg: Column A = 4, Column D = 6
Solved! Go to Solution.
there are several ways to do this, I would suggest you to use the column statistics in DAX query view. It gives all the statistics in view.
https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view
Open DAX query view, on the right hand side you will find all the tables in your model.
Right click on the table, click on Qucik queries -> click on Show column statistics.
In the result tab, you will see a column caled Null count.
You can also find blank or empty values from power query column profiling options. 'Column quality'
https://learn.microsoft.com/en-us/power-query/data-profiling-tools
However by default it will only profile top 1000 rows and the results would show in percentage.
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Create a measure for each column:
Count_Blanks_ColumnA = COUNTROWS(FILTER(YourTable, ISBLANK(YourTable[ColumnA])))
Count_Blanks_ColumnD = COUNTROWS(FILTER(YourTable, ISBLANK(YourTable[ColumnD])))
Replace YourTable, ColumnA, and ColumnD with your actual table and column names.
Unpivot the columns in Power Query:
Option 3: Dynamic Measure for All Columns
To calculate blanks across all columns: Count_Blanks_All =
SUMX(ADDCOLUMNS(
VALUES(YourTable[ColumnName]),"BlankCount", COUNTROWS(FILTER(YourTable, ISBLANK(YourTable[ColumnName])))),[BlankCount])
Use in a table/matrix visual for column-wise blank counts.
Hello @Sajay_Prathap24 ,
the way it will work for you is to do it per column
BlankCount_ColumnA =
calculate(
COUNTROWS(Table), table[columnName] = blank)
Proud to be a Super User! | |
You can try:
CountBlanks_ColumnA = COUNTROWS(FILTER('Table', ISBLANK('Table'[ColumnA])))
CountBlanks_ColumnD = COUNTROWS(FILTER('Table', ISBLANK('Table'[ColumnD])))
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi @Sajay_Prathap24 ,
Thanks for reaching out.
I reviewed this case and I think everyone's insights and workarounds are great.
Do you have any solutions provided by other users to solve the problem? Or you solved it by your own workaround, you are also welcome to share it.
If you still have doubts, please provide a more detailed description, preferably some virtual sample data, and the expected results.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can try:
CountBlanks_ColumnA = COUNTROWS(FILTER('Table', ISBLANK('Table'[ColumnA])))
CountBlanks_ColumnD = COUNTROWS(FILTER('Table', ISBLANK('Table'[ColumnD])))
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hello @Sajay_Prathap24 ,
the way it will work for you is to do it per column
BlankCount_ColumnA =
calculate(
COUNTROWS(Table), table[columnName] = blank)
Proud to be a Super User! | |
Create a measure for each column:
Count_Blanks_ColumnA = COUNTROWS(FILTER(YourTable, ISBLANK(YourTable[ColumnA])))
Count_Blanks_ColumnD = COUNTROWS(FILTER(YourTable, ISBLANK(YourTable[ColumnD])))
Replace YourTable, ColumnA, and ColumnD with your actual table and column names.
Unpivot the columns in Power Query:
Option 3: Dynamic Measure for All Columns
To calculate blanks across all columns: Count_Blanks_All =
SUMX(ADDCOLUMNS(
VALUES(YourTable[ColumnName]),"BlankCount", COUNTROWS(FILTER(YourTable, ISBLANK(YourTable[ColumnName])))),[BlankCount])
Use in a table/matrix visual for column-wise blank counts.
there are several ways to do this, I would suggest you to use the column statistics in DAX query view. It gives all the statistics in view.
https://learn.microsoft.com/en-us/power-bi/transform-model/dax-query-view
Open DAX query view, on the right hand side you will find all the tables in your model.
Right click on the table, click on Qucik queries -> click on Show column statistics.
In the result tab, you will see a column caled Null count.
You can also find blank or empty values from power query column profiling options. 'Column quality'
https://learn.microsoft.com/en-us/power-query/data-profiling-tools
However by default it will only profile top 1000 rows and the results would show in percentage.
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
84 | |
66 | |
54 | |
43 |
User | Count |
---|---|
200 | |
107 | |
96 | |
64 | |
56 |