Forum Discussion
Creating a data table from an Excel table
- 2 years ago
Hi , Atoma
According to your description, you want to calculate the balnk count of the parameters which is your column headers and the percentage of filled.
Here are the steps you can refet to :
(1)This is my test data:
(2)First, we need to unpivot the table in Power Query Editor. We need to check your params columns type is "Text":
And then we need to select the first column and click "unpivot other columns":
Then we can get the table as follows and we can apply the data to Desktop.
(3)Then we can create three measures like this:
Blank Count = CALCULATE( COUNT('Table'[Value]) , 'Table'[Value]<> BLANK())+0Total Count = COUNT('Table'[Value])Percentage = DIVIDE([Total Count]- [Blank Count] , [Total Count])(4)Then we can put the fields and the measures on the visual and we can get the result as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , Atoma
According to your description, you want to calculate the balnk count of the parameters which is your column headers and the percentage of filled.
Here are the steps you can refet to :
(1)This is my test data:
(2)First, we need to unpivot the table in Power Query Editor. We need to check your params columns type is "Text":
And then we need to select the first column and click "unpivot other columns":
Then we can get the table as follows and we can apply the data to Desktop.
(3)Then we can create three measures like this:
Blank Count = CALCULATE( COUNT('Table'[Value]) , 'Table'[Value]<> BLANK())+0Total Count = COUNT('Table'[Value])Percentage = DIVIDE([Total Count]- [Blank Count] , [Total Count])
(4)Then we can put the fields and the measures on the visual and we can get the result as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Atoma2 years agoFrequent Visitor
Thank you very much Aniya. I've just replaced the null values with nothing as I've set up a database which will be updated regularly.
And I put the formula Countblanck instead to count the empty cells.