Forum Discussion

donovan_smith44's avatar
donovan_smith44
Frequent Visitor
6 years ago
Solved

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:       The royal blue bars represented a target financial amount, light bl...
  • v-lid-msft's avatar
    6 years ago

    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.

     

    Then we can change the color of data for each measure

     

     

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

     

     


    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.