Forum Discussion

harshadrokade's avatar
harshadrokade
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

Adding % on clustered bar chart

Hi,

 

I have clustered bar chart as below. I want to show % instead of number on this visual. If I use 'Show as %' option in values tab, it shows % of all blue & grey counts as a whole. I want to show break of blue bars in % seperately which will tally to 100%. Similarly the greys individual % should tally to 100%.

 

Plssssss help me know how to achive the same.

 

 

  • v-zhangti's avatar
    v-zhangti
    4 years ago

    Hi, harshadrokade 

     

    Please check the following methods.

    Measure =
    VAR N1 =
        CALCULATE (
            SUM ( 'Table'[Standard] ),
            FILTER (
                ALL ( 'Table' ),
                [School] = MAX ( 'Table'[School] )
                    && [Skills] = MAX ( 'Table'[Skills] )
            )
        )
    VAR N2 =
        CALCULATE (
            SUM ( 'Table'[Standard] ),
            FILTER ( ALL ( 'Table' ), [School] = MAX ( 'Table'[School] ) )
        )
    RETURN
        DIVIDE ( N1, N2 )
    

     

    Best Regards,

    Community Support Team _Charlotte

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

5 Replies

    • harshadrokade's avatar
      harshadrokade
      Icon for Post Partisan rankPost Partisan

      Hi jaipal,

       

      Pls see below data. I have also created the visual for your referance but it is not showing %. I want tio show % that will tally to 100% seperately for School ABC1 & School ABC2. Light Blue total % wil sum up 100 & dark blue will also sum up 100%

       

       

      StandardSkillsSchool
      1A1ABC1
      2A1ABC1
      3A1ABC1
      4A1ABC1
      5A2ABC1
      6A2ABC1
      7A2ABC1
      8A3ABC1
      9A3ABC1
      10A3ABC1
      11A3ABC1
      12A4ABC1
      13A4ABC1
      14A1ABC2
      15A2ABC2
      16A2ABC2
      17A2ABC2
      18A2ABC2
      19A3ABC2
      20A3ABC2
      21A4ABC2
      22A4ABC2
      23A4ABC2
      24A4ABC2
      25A4ABC2
      26A4ABC2

       

       

       

      • v-zhangti's avatar
        v-zhangti
        Icon for Community Support rankCommunity Support

        Hi, harshadrokade 

         

        Please check the following methods.

        Measure =
        VAR N1 =
            CALCULATE (
                SUM ( 'Table'[Standard] ),
                FILTER (
                    ALL ( 'Table' ),
                    [School] = MAX ( 'Table'[School] )
                        && [Skills] = MAX ( 'Table'[Skills] )
                )
            )
        VAR N2 =
            CALCULATE (
                SUM ( 'Table'[Standard] ),
                FILTER ( ALL ( 'Table' ), [School] = MAX ( 'Table'[School] ) )
            )
        RETURN
            DIVIDE ( N1, N2 )
        

         

        Best Regards,

        Community Support Team _Charlotte

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

  • jaipal's avatar
    jaipal
    Icon for Resolver III rankResolver III

    harshadrokade  I am asuming you looking for the similar solution

     

    Measure = COUNTA('Table'[Skill])/CALCULATE(COUNTA('Table'[School]), ALLSELECTED('Table'[Skill]))