6 Replies Latest reply on Nov 8, 2018 7:31 AM by Muneeb Mansoor

# Flip and reverse the order of two out of three groups on a bar chart

Hey all,

I'm trying to see if it's possible to create a viz that has three categories but two of these are flipped and reversed on both y and x-axes. Please see the screenshot below. What I'm trying to accomplish is to flip yellow and red bars along x-axis and then also change the order of the bars to go from least percentage on the left to the highest percentage on the right. Thanks for the help in advance.

Sample workbook attached

• ###### 1. Re: Flip and reverse the order of two out of three groups on a bar chart

Hi Muneeb,

You could multiple the numbers by -1 or invert them.

Have you got a workbook with sample data to send across?

Thanks,

Mavis

• ###### 2. Re: Flip and reverse the order of two out of three groups on a bar chart

Hi Mavis,

I'm trying to see if I can obfuscate the data to be able to share. The main issue with multiplying the numbers by -1 is that I need some sort of CASE of IF statement so that it is multiplied only for the yellow and red categories and not for the green.

• ###### 3. Re: Flip and reverse the order of two out of three groups on a bar chart

Hi Muneeb,

Yep that's it exactly, what would be the issue with using a conditional statement? Is there a way in which the worksheet/calculations are built which may conflict with the conditional statement?

Thanks,

Mavis

• ###### 4. Re: Flip and reverse the order of two out of three groups on a bar chart

Hi Mavis,

Sorry for the delayed response. I've now attached the sample workbook. Thanks again for working with me on this.

• ###### 5. Re: Flip and reverse the order of two out of three groups on a bar chart

Hi Muneeb,

Please see worksheet Sheet 1 (2) in the attached workbook. I have used the calculation in this view:

if MIN([EPD Bucket]) = 'At or above target' then

(COUNT([EPD Bucket])/TOTAL(COUNT([EPD Bucket])))

else

(COUNT([EPD Bucket])/TOTAL(COUNT([EPD Bucket])))*-1

END

Thanks,

Mavis

• ###### 6. Re: Flip and reverse the order of two out of three groups on a bar chart

Hi Mavis,

This is super helpful. Thanks so much for looking into this. If I may ask another question please, I can see that the bars are in the right order that is, going from the highest percentage (by Rank Calc) to the lowest (or vice versa in case of yellow and red bars) but the Rank by EPD numbers are in seemingly random order. I've highlighted them in the screenshot below. Is there a way to show them going from 1 to 10 or 10 to 1 (for yellow and red bars)?