Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
YashGurudath891
Regular Visitor

How to show all the tables in the model as a list of fields and count blank values within that ?

Hello All,

 

I am trying to find a way to list all the tables existing within a PowerBI model as fields and then count the blank values within each of those tables. (It can include the all the blank values from all the fields within each table).

Something like this :

Table NamesCount of Blank Values
Table 110
Table 220
Table 315
Table 46
Table 57

 

Thanks in Advance
Yash G

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @YashGurudath891 ,

 

First, create a new column for each table as the table name.

Then create a new table with all table names as one column.

Finally, create a measure to calculate the number of blank values for each table.

Measure = SWITCH(TRUE(),
            MAX('Table'[Column1]) in VALUES(Table1[Column]),
            CALCULATE(COUNTROWS(FILTER(Table1,ISBLANK(Table1[Column2])))),
            MAX('Table'[Column1]) in VALUES(Table2[Column]),
            CALCULATE(COUNTROWS(FILTER(Table2,ISBLANK(Table2[Column2])))))

Sample .pbix

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @YashGurudath891 ,

 

First, create a new column for each table as the table name.

Then create a new table with all table names as one column.

Finally, create a measure to calculate the number of blank values for each table.

Measure = SWITCH(TRUE(),
            MAX('Table'[Column1]) in VALUES(Table1[Column]),
            CALCULATE(COUNTROWS(FILTER(Table1,ISBLANK(Table1[Column2])))),
            MAX('Table'[Column1]) in VALUES(Table2[Column]),
            CALCULATE(COUNTROWS(FILTER(Table2,ISBLANK(Table2[Column2])))))

Sample .pbix

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This solution is perfect. But, I am not looking for blank values in just one column. I want to look for blank values throughout the table (if there are over 20 cloumns). Do I have to repeat that for every column ? Is there a better way .

Thanks alot for this.

parry2k
Super User
Super User

@YashGurudath891 what you mean blank values if a table has 10 columns, do you want to check the blank value in a column? Not sure if checking the blank value in a table makes sense, maybe I'm missing something.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Table1

Column1Column2Column3Column4Column5
1caa0pp
2cbb0qq
3acc0rr
3add0ss
4 ee hh
 aff0jj
4b 0ii
5b 0 
5bhh0kk

 

Table2

Column1Column2
0pp
0qq
0rr
0ss
 hh
0jj
0ii
0 
0kk

 

Table3

Column1Column2Column3
1aapp
2bbqq
3ccrr
3ddss
4eehh
 ffjj
4 ii
5  
5hhkk



End Results

Table NameTotal Blank Values
Table16
Table22
Table34



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.