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.
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 Names | Count of Blank Values |
Table 1 | 10 |
Table 2 | 20 |
Table 3 | 15 |
Table 4 | 6 |
Table 5 | 7 |
Thanks in Advance
Yash G
Solved! Go to Solution.
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])))))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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])))))
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.
@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
Column1 | Column2 | Column3 | Column4 | Column5 |
1 | c | aa | 0 | pp |
2 | c | bb | 0 | |
3 | a | cc | 0 | rr |
3 | a | dd | 0 | ss |
4 | ee | hh | ||
a | ff | 0 | jj | |
4 | b | 0 | ii | |
5 | b | 0 | ||
5 | b | hh | 0 | kk |
Table2
Column1 | Column2 |
0 | pp |
0 | |
0 | rr |
0 | ss |
hh | |
0 | jj |
0 | ii |
0 | |
0 | kk |
Table3
Column1 | Column2 | Column3 |
1 | aa | pp |
2 | bb | |
3 | cc | rr |
3 | dd | ss |
4 | ee | hh |
ff | jj | |
4 | ii | |
5 | ||
5 | hh | kk |
End Results
Table Name | Total Blank Values |
Table1 | 6 |
Table2 | 2 |
Table3 | 4 |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |