5 Replies Latest reply on Jun 19, 2018 6:14 AM by Michael Ye

Reverse on side of same axis

I have a worksheet that looks like this and I would  like to reverse the Male side of the axis to create a pyramid graph. When I try to edit the axis and reverse it, both sides get reversed. How do I only reverse one side of the axis?

• 1. Re: Reverse on side of same axis

Hi, Johanna,

Iguess you've Gender dimension having male/female values. You need to create two measures one for Male another for Female based on your ssn count.

Then drag your measures in columns shelf and edit one of your measure and put -ve sign at first to make it reversed.

I've used superstore data to demonstrate your scenario. I've sales measure twice and edited left most sales measure and put -ve sign to make it reversed. See the screenshot

Press enter and see the magic. Apply sorting post enter. You'll get something similar to below screenshot.

Note: Using -ve sign your tool-tip will have -ve measure. So take care of that using duplicated field or from custom format.

Hope this help. Let me know if you've any question.

Mahfooj

2 of 2 people found this helpful
• 2. Re: Reverse on side of same axis

Hi Johanna,

I don't know the exact dimension or measure names from the picture, but you need to make a calculated field something like:

IF [Gender]='Male' THEN -COUNTD([SSN])

ELSEIF [Gender]='Female' THEN COUNTD([SSN])

END

Hope it helps.

Michael Ye

3 of 3 people found this helpful
• 3. Re: Reverse on side of same axis

Hi! Thank you for answering. When I try this I get this error message. Calculation1 is a calculation on the ssn to determine if the person is a male or female.

• 4. Re: Reverse on side of same axis

Hi,

Just modify the formula as below.

IF  min([Gender])='Male' THEN -COUNTD([SSN])

ELSEIF min([Gender])='Female' THEN COUNTD([SSN])

END

3 of 3 people found this helpful
• 5. Re: Reverse on side of same axis

Johanna,

Using ATTR([Gender]), it will be OK.

Generally, ATTR function is used to make a dimension to aggregated calcs, which will be compatible with SUM() or AVG(). Thanks,

Michael Ye

3 of 3 people found this helpful