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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Gazanfar
Frequent Visitor

DAX COMMAND

I have data in excel as shown below.

 

     C1_1                C1_2                 C1_3              C1_4               C1_5

AffordableAffordableDo not knowDo not knowAffordable
AffordableAffordableDo not knowDo not knowDo not know
AffordableAffordableDo not knowAffordableAffordable
AffordableAffordableDo not knowDo not knowAffordable
Not affordableNot affordableDo not knowDo not knowNot affordable
AffordableDo not knowAffordableAffordableAffordable
AffordableDo not knowDo not knowDo not knowAffordable
AffordableDo not knowNot affordableDo not knowDo not know
AffordableAffordableDo not knowDo not knowDo not know
AffordableDo not knowDo not knowDo not knowDo not know
AffordableAffordableDo not knowDo not knowDo not know
AffordableAffordableDo not knowDo not knowDo not know

 

And I want to get visualization in Power BI as shown below. I do not know which measures I have to use to get this kind of table in Power BI. If anyone knows please help. Thanks in advance!

 

Gazanfar_0-1654693486446.png

 

1 ACCEPTED SOLUTION
Syk
Resident Rockstar
Resident Rockstar

Once you load your data, click "transform data" to bring up your power query window.
Once that window opens, select all of your columns and then under the transform tab, click unpivot columns
This should give you a table with 2 columns - Attribute and Value (see screenshot using your example data)

Syk_0-1654700511458.png

Close and apply these changes.
Add a matrix visualization to your canvas, add the Attribute field to Rows and Value to columns
Then add your Attribute field to the values. (It should change to "First Attribute" because it is a text field) click the arrow next to it and select "Count" instead of "First".
Then select the same arrow and under "Show value as" select "Percent of row total" for your use case. Then remove the totals from the matrix and you should have what you need!

 

Syk_1-1654700882808.png

 

View solution in original post

3 REPLIES 3
Syk
Resident Rockstar
Resident Rockstar

Once you load your data, click "transform data" to bring up your power query window.
Once that window opens, select all of your columns and then under the transform tab, click unpivot columns
This should give you a table with 2 columns - Attribute and Value (see screenshot using your example data)

Syk_0-1654700511458.png

Close and apply these changes.
Add a matrix visualization to your canvas, add the Attribute field to Rows and Value to columns
Then add your Attribute field to the values. (It should change to "First Attribute" because it is a text field) click the arrow next to it and select "Count" instead of "First".
Then select the same arrow and under "Show value as" select "Percent of row total" for your use case. Then remove the totals from the matrix and you should have what you need!

 

Syk_1-1654700882808.png

 

Gazanfar
Frequent Visitor

Thank you Syk, you explained everything in detail and your advice helped me too much! 

Syk
Resident Rockstar
Resident Rockstar

Great to hear! Consider marking that reply as the solution so others can easily find it if they have a similar issue!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.