Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Measure %

Hello,

 

I have a sample data where I need to measure % and visualize them.

How to do that?

Can anyone give any idea?

  • Hi, Anonymous 

    According to your description and sample picture, I can understand your requirement clearly, I think you can try this measure to achieve this:

    Percentage =
    
    var _total=SUMX(ALL('sample data'),[Total_Steps])
    
    return
    
    DIVIDE(SUM('sample data'[Total_Steps]),_total)

    Then change the format of the measure to “Percentage” in the measure tool like this:

     

    Then create a clustered bar chart and place it like this:

     

    And you can get what you want.

    You can download my test pbix file below

     

    More info about Clustered Bar Chart in Power BI

     

    Best Regards,

    Community Support Team _Robert Qin

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

3 Replies

  • Anonymous , Not very clear

    divide(sum(Table[Total_steps]), Calculate(sum(Table[Total_steps]), allselected(Table)))

     

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Need to measure % each Business_Process_Definition by total steps

    Output should look like below-

     

  • v-robertq-msft's avatar
    v-robertq-msft
    Community Support

    Hi, Anonymous 

    According to your description and sample picture, I can understand your requirement clearly, I think you can try this measure to achieve this:

    Percentage =
    
    var _total=SUMX(ALL('sample data'),[Total_Steps])
    
    return
    
    DIVIDE(SUM('sample data'[Total_Steps]),_total)

    Then change the format of the measure to “Percentage” in the measure tool like this:

     

    Then create a clustered bar chart and place it like this:

     

    And you can get what you want.

    You can download my test pbix file below

     

    More info about Clustered Bar Chart in Power BI

     

    Best Regards,

    Community Support Team _Robert Qin

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