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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Displaying values from multiple columns that can be used in a pie graph

Beginner here. Looking for some help.

 

I have 4 columns that have several values (free text from a survey) but most are metrics (AHT, FCR, etc)

 

I would like to create a graph that counts and display the most common values between those 4 columns.

 

Metric 1Metric 2Metric 3Metric 4 
ReliabilityAHTeNPSAHT
AHTQA SCORENPSN/A
AHTFCReNPS STeNPS MT
AHTFCRenps STenps MT
AHTFCReNPS STeNPS MT
QualityNot applicableNot applicableNot applicable
EfficiencyDETRACTORQAReliability
DetractorEfficiency ScoreQuality ScoreN/A
MCRAMaxsellReliabilityNot Applicable
ReliabilityProductivityQAN/A
 ProductivityQuality  ReliabilityNot Applicable 
CPHReliabilityWork HoursN/A
EfficiencyDetractorsQualityNot Applicable
ENPSAHTMAERELIABILITY
ENPSFCRAHTNot Applicable
MACRMax SellReliabilityQA

 

AHT - 8

Not applicable - 7

FCR - n

ENPS - n

and so forth.

 

Then from this measure, I can use to create a pie graph that shows the distribution of the most frequently used to the least.

 

I appreciate the help!

1 ACCEPTED SOLUTION
johnbasha33
Super User
Super User

@Anonymous 

To achieve this in Power BI, you can follow these steps:

1. **Combine the Columns**: First, you need to combine the values from all four columns into a single column. You can do this using Power Query Editor.

2. **Count the Occurrences**: Once you have all the values in a single column, you can count the occurrences of each value.

3. **Create a Pie Chart**: Finally, you can use the count of occurrences to create a pie chart to display the distribution of the most common values.

Here's a step-by-step guide:

1. **Combine Columns**:
Open your dataset in Power BI and go to the "Transform Data" (Power Query Editor) window.
- Select the four columns containing your metrics (Metric 1, Metric 2, Metric 3, Metric 4).
- Click on the "Transform" tab and select "Unpivot Columns" to combine the columns into a single column.
- Rename the new column to something like "Metrics".

2. **Count Occurrences**:
- Close the Power Query Editor and return to your report view.
- In the report view, go to the "Modeling" tab and select "New Table".
- Enter the following DAX expression to count the occurrences of each metric:
```
MetricCounts = SUMMARIZE('YourTableName', 'YourTableName'[Metrics], "Count", COUNTROWS('YourTableName'))
```
Replace 'YourTableName' with the name of your dataset.

3. **Create a Pie Chart**:
- With the new table created in the previous step selected, go to the "Visualizations" pane.
- Choose "Pie Chart" visualization.
- Drag the "Metrics" column to the "Legend" field and the "Count" column to the "Values" field.
- You should now have a pie chart showing the distribution of the most common metrics.

This approach will give you a pie chart displaying the distribution of the most frequently occurring metrics. You can then use this visualization to see which metrics are most commonly mentioned in your survey data.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

View solution in original post

1 REPLY 1
johnbasha33
Super User
Super User

@Anonymous 

To achieve this in Power BI, you can follow these steps:

1. **Combine the Columns**: First, you need to combine the values from all four columns into a single column. You can do this using Power Query Editor.

2. **Count the Occurrences**: Once you have all the values in a single column, you can count the occurrences of each value.

3. **Create a Pie Chart**: Finally, you can use the count of occurrences to create a pie chart to display the distribution of the most common values.

Here's a step-by-step guide:

1. **Combine Columns**:
Open your dataset in Power BI and go to the "Transform Data" (Power Query Editor) window.
- Select the four columns containing your metrics (Metric 1, Metric 2, Metric 3, Metric 4).
- Click on the "Transform" tab and select "Unpivot Columns" to combine the columns into a single column.
- Rename the new column to something like "Metrics".

2. **Count Occurrences**:
- Close the Power Query Editor and return to your report view.
- In the report view, go to the "Modeling" tab and select "New Table".
- Enter the following DAX expression to count the occurrences of each metric:
```
MetricCounts = SUMMARIZE('YourTableName', 'YourTableName'[Metrics], "Count", COUNTROWS('YourTableName'))
```
Replace 'YourTableName' with the name of your dataset.

3. **Create a Pie Chart**:
- With the new table created in the previous step selected, go to the "Visualizations" pane.
- Choose "Pie Chart" visualization.
- Drag the "Metrics" column to the "Legend" field and the "Count" column to the "Values" field.
- You should now have a pie chart showing the distribution of the most common metrics.

This approach will give you a pie chart displaying the distribution of the most frequently occurring metrics. You can then use this visualization to see which metrics are most commonly mentioned in your survey data.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.