Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Group data and nice graph

Hi! Does anyone know how to do this easily? I want to group two columns (to create kind of family) and get the result as on attached graph.

Blue, green and yellow bars are XYZ and the axis shows value(dollars).

Table:

Future graph:

  • Anonymous's avatar
    Anonymous
    6 years ago

    You get the samer result by dragging columns as shown in picture below into a clustered column chart:

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You get the samer result by dragging columns as shown in picture below into a clustered column chart:

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous wrote:

      You get the samer result by dragging columns as shown in picture below into a clustered column chart:

       


      Im soooo stupid :) thanks man!

       

      Do you know though how to re-change the order in graph? Mine is D A C B...

      • Ani1991's avatar
        Ani1991
        Resolver III

        Hi Anonymous 
        At the right top corner of the visual there is an ellipse (...) button. Click on it and select Sort by the column name that you used as X axis and then do sort by ascending.

         

        Thanks,

        Ani

  • Ani1991's avatar
    Ani1991
    Resolver III

    Hi Anonymous 

    You can create 3 measures like below

    SUM_X = CALCULATE(SUM(abcdon[DOLLARS]),FILTER(abcdon,abcdon[XYZ] = "X"))
    
    SUM_Y = CALCULATE(SUM(abcdon[DOLLARS]),FILTER(abcdon,abcdon[XYZ] = "Y"))
    
    SUM_Z = CALCULATE(SUM(abcdon[DOLLARS]),FILTER(abcdon,abcdon[XYZ] = "Z"))

    Drag this in a clustered column chart as shown and you will get the expected output.

     

    Hope this helps!!

     

    Thanks,

    Ani

    • Anonymous's avatar
      Anonymous
      Not applicable

      Is your line correct?

       

      When I start to write it down it created me this:

       

      SUMX = CALCULATE(SUM((data[ABC(D)] ...
       
      How should i continue as I can put two columns in this calculation?
      • Ani1991's avatar
        Ani1991
        Resolver III

        Hi Anonymous 
        Those are 3 different measures.
        You will need to create 3 different measures by writing those lines respectively in three different measures.

        Else you can also follow the method suggested by Anonymous  Sorry I missed the Legend field, my bad :(

         

        Thanks,

        Ani