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.
I want to create a bar visual with text shown on it instead of number.
I have below data. When someone selects Team A on slicer, the bar visual should show small bar with data label as Low & not 20. Similarly, when B team is selected on slicer, the visual should show little bigger bar with data label as Medium & not 60. Can you pls help.
Refer belwo data & sample visual I gave below-
Team | Score | Formulas |
A | 20 | Low |
B | 60 | Medium |
C | 80 | High |
Solved! Go to Solution.
The closest effect I realized with a clustered bar chart is below, though not beautiful and need to be improved. 😅
The main points are:
1. Add a new column to the table to be used to determine the length of the bar.
2. Create a measure for the conditional title of this bar chart
I still take the old score data for example as the settings are similar. In your case, drag the Data label column into Details field of a pie chart. Then format the Detail labels and select Category for Label style.
Based on my test, Details field doesn't accept a measure, so you need to create a column in the table rather than a measure.
Data label column =
SWITCH (
TRUE (),
'Scoredata'[Actual score] >= 0.2
&& 'Scoredata'[Actual score] <= 0.3, "Very Bad",
'Scoredata'[Actual score] >= 0.4
&& 'Scoredata'[Actual score] <= 0.5, "Bad",
'Scoredata'[Actual score] >= 0.6
&& 'Scoredata'[Actual score] <= 0.7, "Good",
'Scoredata'[Actual score] >= 0.9
&& 'Scoredata'[Actual score] <= 1, "Very Good"
)
Regards,
Jing
The closest effect I realized with a clustered bar chart is below, though not beautiful and need to be improved. 😅
The main points are:
1. Add a new column to the table to be used to determine the length of the bar.
2. Create a measure for the conditional title of this bar chart
@v-jingzhang Hello Sir,
I have similar use case where
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
I still take the old score data for example as the settings are similar. In your case, drag the Data label column into Details field of a pie chart. Then format the Detail labels and select Category for Label style.
Based on my test, Details field doesn't accept a measure, so you need to create a column in the table rather than a measure.
Data label column =
SWITCH (
TRUE (),
'Scoredata'[Actual score] >= 0.2
&& 'Scoredata'[Actual score] <= 0.3, "Very Bad",
'Scoredata'[Actual score] >= 0.4
&& 'Scoredata'[Actual score] <= 0.5, "Bad",
'Scoredata'[Actual score] >= 0.6
&& 'Scoredata'[Actual score] <= 0.7, "Good",
'Scoredata'[Actual score] >= 0.9
&& 'Scoredata'[Actual score] <= 1, "Very Good"
)
Regards,
Jing
Thanks a lot sir. This is closer to the solution.
@harshadrokade , One of the ideas that came to me, is that having three image URLs added to this table, like what you shown and display max of that
And How to do that sir. 🙂 I am very new to the Power bi sir. Can you suggest a measure that can help me to show text on a bar chart instead of values?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |