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
donovan_smith44
Frequent Visitor

Formatting Bars in a Clustered Chart

Hi all,

 

I'm a total Power BI noob, so wanted to know if something was possible. I have this bar chart pictured:

 
 

BarChart.PNG

 

The royal blue bars represented a target financial amount, light blue is actual financial amount. I wanted to add something that indicates the following:

 

Actual >= 95% of target, some green-colored visual indicator.

80%=<Actual<95% of target, yellow-colored visual indicator.

Actual < 80% of target, red-colored indicator.

 

Would anyone happen to know the best way to go about doing this? Any help is appreciated.

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @donovan_smith44 ,

 

We can also archieve your requirement in a build in clustered bar chart with trick. Create two measures as actually or amount, adjust the formula based on your own data model.

 

Actually = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Type]="2019"))

 

Target = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Type]="Other"))

 

Then we create three more measures, put them and target into the value field of visual.

 

<80% = IF([Actually]<0.8*[Target],[Actually],BLANK())

 

80 - 95% = IF([Actually]<0.95*[Target] && [Actually]>=0.8*[Target] ,[Actually],BLANK())

 

>95% = IF([Actually]>=0.95*[Target],[Actually],BLANK())

 

You can also change the name of these measure.

 

6.PNG

Then we can change the color of data for each measure

 

7.PNG

 

We also provided a usage of bullet chart in the page 2 of sample pbix file.

 

8.PNG

 


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-lid-msft
Community Support
Community Support

Hi @donovan_smith44 ,

 

We can also archieve your requirement in a build in clustered bar chart with trick. Create two measures as actually or amount, adjust the formula based on your own data model.

 

Actually = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Type]="2019"))

 

Target = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Type]="Other"))

 

Then we create three more measures, put them and target into the value field of visual.

 

<80% = IF([Actually]<0.8*[Target],[Actually],BLANK())

 

80 - 95% = IF([Actually]<0.95*[Target] && [Actually]>=0.8*[Target] ,[Actually],BLANK())

 

>95% = IF([Actually]>=0.95*[Target],[Actually],BLANK())

 

You can also change the name of these measure.

 

6.PNG

Then we can change the color of data for each measure

 

7.PNG

 

We also provided a usage of bullet chart in the page 2 of sample pbix file.

 

8.PNG

 


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lid-msft  This is great. Do you know how to create a bullet chart with the green shading to the left, yellow in the middle, and red to the right? That would seem to make sense in some contexts where the more something is consumed, the more it moves in to the red area.

Hi @bchager6 ,

 

We can change the colors in the setting as following picuture.

 

1.PNG


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you. This is great. Will try.

bchager6
Super User
Super User

I recommend researching the conditional formatting options available with tables, matrices and bullet charts. Especially bullet charts.

Thank you. Bullet charts are something I haven't tried.

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.