Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Cluster values on X axis bar chart

I have 4 different measures calculation percentage. 

I am looking for a way to cluster the bars in pairs and add x values to each cluster like this: (0-100.000, >100.000-500.000) etc.

 

 

 

Thanks

Thomas

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    You can try to create a separate table as follows, then reference them in the measure, and map them accordingly.

     

    The measure is just like

     

    Measure =
    SWITCH (
        MAX ( 'Table'[Range] ),
        "0-100000",
            CALCULATE (
                SUM ( 'Table (2)'[Values] ),
                FILTER ( 'Table (2)', [Values] > 0 && [Values] < 100000 )
            )
    )

     

     

    Best Regards,

    Stephen Tao

     

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

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    Can you just create two new measures that are the sums of the measure pairs and use those in your visual?

    Pat

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi mahoneypat 
      No, unfortunately that can't do it.
      The bars are showing in percentage. 
      The first two should be placed on X-asis (0-100.000) etc.
      Best
      Thomas

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You can try to create a separate table as follows, then reference them in the measure, and map them accordingly.

     

    The measure is just like

     

    Measure =
    SWITCH (
        MAX ( 'Table'[Range] ),
        "0-100000",
            CALCULATE (
                SUM ( 'Table (2)'[Values] ),
                FILTER ( 'Table (2)', [Values] > 0 && [Values] < 100000 )
            )
    )

     

     

    Best Regards,

    Stephen Tao

     

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