Forum Discussion

Atoma's avatar
Atoma
Frequent Visitor
2 years ago
Solved

Creating a data table from an Excel table

Hello everyone,   I would like to carry out audits using a powerbi of data extracted in excel but on PowerBi. The expected result is as follows: The excel table contains parameter names in t...
  • v-yueyunzh-msft's avatar
    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())+0
    Total 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