Forum Discussion

ncbshiva's avatar
ncbshiva
Icon for Advocate V rankAdvocate V
7 years ago
Solved

Sort the Order in the Stacked Bar chart

Hi Team,

 

My requirement is to sort the order in the Stacked bar graph as shown below. As you can see in the first stacked bar graph the Medium with value 3 is on top  and then Hard with value 2 is at bottom . I want this to be reversed means Hard with red color value 2 should come on top and then the Medium with value 3 should come bottom.

 

Here the legend is a "Calculated Column".

 

 

Thanks in advance.

  • Hi ,

     

    I got the solution , i tried to create separate measures for hard,medium and easy and use them in Value box and arrange these measures as added so that it sorts the column charts as required.

     

12 Replies

    • ncbshiva's avatar
      ncbshiva
      Icon for Advocate V rankAdvocate V

      Hi,

       

      Here my category column is calculated one and below is the formula for it.

       

      IFCondition = IF('Capability Data'[Difficulty to Fill]="Hard" && 'Capability Data'[How large is the gap to fill]="1";"Hard";
      IF('Capability Data'[Difficulty to Fill]="Hard" && 'Capability Data'[How large is the gap to fill]="2";"Hard";
      IF('Capability Data'[Difficulty to Fill]="Hard" && 'Capability Data'[How large is the gap to fill]="3";"Hard";
      IF('Capability Data'[Difficulty to Fill]="Medium" && 'Capability Data'[How large is the gap to fill]="3";"Hard";
      IF('Capability Data'[Difficulty to Fill]="Medium" && 'Capability Data'[How large is the gap to fill]="1";"Medium";
      IF('Capability Data'[Difficulty to Fill]="Medium" && 'Capability Data'[How large is the gap to fill]="2";"Medium";
      IF('Capability Data'[Difficulty to Fill]="Easy" && 'Capability Data'[How large is the gap to fill]="3";"Medium";
      IF('Capability Data'[Difficulty to Fill]="Easy" && 'Capability Data'[How large is the gap to fill]="1";"Easy";
      IF('Capability Data'[Difficulty to Fill]="Easy" && 'Capability Data'[How large is the gap to fill]="2";"Easy";BLANK()
      )))))))))
       
      And if i create a new calculated field for the sorting and use that in the Sort by columns , i am getting below error.

       

       
       
      • ncbshiva's avatar
        ncbshiva
        Icon for Advocate V rankAdvocate V

        Hello,

         

        Can anyone please help me with this sorting issue ?

         

        Regards

  • themistoklis's avatar
    themistoklis
    Icon for Community Champion rankCommunity Champion

    ncbshiva

     

    Cick on the 3 dots on the top right of the object:

    1. Sort by (select the Measure)

    2. Sort Ascending 

    • ncbshiva's avatar
      ncbshiva
      Icon for Advocate V rankAdvocate V

      Hi,

       

      The is not working , it is changing the position of the x-axis.