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
harshadrokade
Post Partisan
Post Partisan

Showing ranges on visual instead of whole number value

I have a use case where I have below data. I want to create a pie chart with values in column 'Actual score' but the data labels should show values as mentioned in 'Data label' column. So for Team A, it should show value on pie as Very Bad instead of 25%. Pls help sir/mam to create a measure that will consider the below mentioned conditions & show the Data lael in text format instead of score value.

 

Table name- Scoredata

Team    Actual score                     Data label- Condition for deciding Data label

A          25%                                  If score is between 20-30%, Very Bad

B          45%                                  If score is between 40-50%, Bad             

C          67%                                  If score is between 60-70%, Good                

D          95%                                  If score is between 90-100%, Very Good           

5 REPLIES 5
v-yetao1-msft
Community Support
Community Support

Hi @harshadrokade 

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

Thanks a lot @v-yetao1-msft. I will try it out & kee you posted 🙂

v-yetao1-msft
Community Support
Community Support

Hi @harshadrokade 

You can create a measure to return the appraisal .

Measure = SWITCH(TRUE(),SELECTEDVALUE(Scoredata[Actual score])>=0.2 && SELECTEDVALUE(Scoredata[Actual score])<=0.3,"Very Bad",

                        SELECTEDVALUE(Scoredata[Actual score])>=0.4 && SELECTEDVALUE(Scoredata[Actual score])<=0.5,"Bad",

                        SELECTEDVALUE(Scoredata[Actual score])>=0.6 && SELECTEDVALUE(Scoredata[Actual score])<=0.7,"Good",

                        SELECTEDVALUE(Scoredata[Actual score])>=0.9 && SELECTEDVALUE(Scoredata[Actual score])<=1,"Very Good" )

The effect is as shown

Ailsamsft_0-1624255697718.png

But in pie chart visual , if you add Scoredata[Actual score] in Values , you cannot hide the value for Scoredata[Actual score] .Once you remove Scoredata[Actual score] from the visual ,the display will be abnormal .

Ailsamsft_1-1624255697721.png

Ailsamsft_2-1624255697722.png

Best Regards

Community Support Team _ Ailsa Tao

 

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

Hi Ailsa,

 

Thank you for sharing this, this worked for my dataset, however, how can I sum together if I have multiple scores in "actual scores" column based on my selected values? 

Thanks a lot for all your help @v-yetao1-msft. I tried this but I am not getting Measure values on Pie data labels. How can I get to see Very Bad, Good, Very Good labels on Data labels? Pls help

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.