Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Field Parameter for Pie Chart Not Working Properly

Hi All, 

 

I have 4 variables which captures the likeliness of recommending a product. They are all in Text and has 6 possible values: Extremely Unlikely, Unlikely, Neutral, Somewhat Likely, Extremely Likely, Don't Know. The sample table is below: 

 

Q11_HondaQ11_SuzukiQ11_MazdaQ11_Toyota
Somewhat likelySomewhat likelyExtremely likelyExtremely likely
Not very likelySomewhat likelySomewhat likelyNot very likely
Extremely likelySomewhat likelySomewhat likelyExtremely likely
NeutralExtremely UnlikelySomewhat UnlikelyNeutral

 

I am trying to create a pie-chart to show the percentage of each likeliness. I've done the following:

 

1. Based on the variables above, I created a field parameter as below:

 

Test = {
    ("Toyota", NAMEOF('Sheet1'[Q11_Toyota]), 0),
    ("Mazda", NAMEOF('Sheet1'[Q11_Mazda]), 1),
    ("Honda", NAMEOF('Sheet1'[Q11_Honda]), 2),
    ("Suzuki", NAMEOF('Sheet1'[Q11_Suzuki]), 3)
}

 

The result is as follows:

2. Add Donut pie chart and set the 'Values' and 'Legend' with the parameter

3. However, after toggling the field parameter above, the result is showing the following:

 

The count is all 1 across all category and the percentages of the categories are evenly split. Can someone help me and tell me how I can go around this?

  • Hi Anonymous 
    Field parameters are less recommended for analyzing data by categories, the best practice is to unpivot the table and to bring it to :

    more information about it on the link

    https://www.youtube.com/watch?v=OdmrPM_zqgs

    I also prepared PBIX with the data that you put on question, so you can follow my steps on pq:
    Link to PBIX 

    According to the visualization,

    Unfortunately, I was not able to fully understand the type of comparison you are trying to make, so I prepared some examples with different comparisons.

    If it is not one of the three comparisons I prepared (you can find them in the linked file too), please show the desired result.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

1 Reply

  • Hi Anonymous 
    Field parameters are less recommended for analyzing data by categories, the best practice is to unpivot the table and to bring it to :

    more information about it on the link

    https://www.youtube.com/watch?v=OdmrPM_zqgs

    I also prepared PBIX with the data that you put on question, so you can follow my steps on pq:
    Link to PBIX 

    According to the visualization,

    Unfortunately, I was not able to fully understand the type of comparison you are trying to make, so I prepared some examples with different comparisons.

    If it is not one of the three comparisons I prepared (you can find them in the linked file too), please show the desired result.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly