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

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.

Reply
jthake
Regular Visitor

pie chart extracted values

I have a dataset where each row is a survey response. In one of the columns, it is an answer to a question. Which the users can select more than one option, that is currently sepated by a semi-column (using the query editor).

What I'm trying to do is show a pie chart of the answers, and its treating the answers with multi-values as a unique answer, rather than splitting and counting as distinct individual values on the pie chart.

 

Is there a way to handle this?

 

e..g.

 

SurveyID | Answer

1 | Red; Yellow

2 | Yellow

3| Green; Red

4 | Yellow

 

The pie chart would show: Red = 2, Yellow = 3, Green = 1

1 ACCEPTED SOLUTION

When you do the split, in the advanced options you should be able to split into rows:

 

2017-06-13_16-38-56.png

 

The result should look like:

 

2017-06-13_16-40-51.png

 

Now if you create a pie chart it should give you what you are looking for:

 

2017-06-13_16-43-04.png

 

 

View solution in original post

4 REPLIES 4
v-sihou-msft
Employee
Employee

@jthake

 

Pie chart will always aggregate the data on category level. So when you put Answer into Pie chart, it will count the number of Answers for different colors.

 

In your scenario, if you want to analysis data on each survey level, it's better to use other type of chart, like Column chart. You can put Survey on X-axis, and put Answer on Legend. Then use Count of Answers as Value.

 

Regards,

 

 

leJuan5150
Helper I
Helper I

One of many options is you can right-click on the "Answer" column in the Query Editor and "Split Column -> By Delimiter...".  In the "Advanced Options" split into "Rows".  Make sure you Trim the column to remove the leading spaces.  The resulting dataset should work well with the pie chart.

Split column is disabled on this column. Right now each row redners in Query Editor as "[List]". 
I can extract values and do as 'colon'. Then Ican split. But it creates a new column with ".1" and ".2".  I'm guessing if there are more mutliple selections you'd get more of these too.

Then when I try to use both columns in the pie chart. I drag both columns onto legend  and both as counts onto values. but as not all columns have values, it shows a count on some blank. If I try an do an advanced filter. ANd "is not blank" it removes rows from pie chart. 

How do I do this properly so it shows all?

When you do the split, in the advanced options you should be able to split into rows:

 

2017-06-13_16-38-56.png

 

The result should look like:

 

2017-06-13_16-40-51.png

 

Now if you create a pie chart it should give you what you are looking for:

 

2017-06-13_16-43-04.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.