12 Replies Latest reply on Oct 16, 2017 3:22 AM by Jayshree Dawrewar

Negative Values

Dear All,

I have an Calculated field like something below. I need to show Cancelled in Negative Values. Can someone help me with this.

Tried multiplying CancelledSaleValue with -1(- [CancelledSaleValue]) but its not showing.

Case [SalesViewBy]

When "Gross" then Sum(

If [Order Status (group)]='Confirmed' then [Sale Value]

ELSEIF [OrderStatus]='Cancelled' then [CancelledSaleValue]

END)/10000000

When "Unit" then

Countd(

If [Order Status (group)]='Confirmed' then [Unit ID]

ELSEIF [OrderStatus]='Cancelled' then [CancelUnitID]

END)

When "Area" then Sum(

If [Order Status (group)]='Confirmed' then [Saleable Area]

ELSEIF [OrderStatus]='Cancelled' then [CancelSaleableArea]

END)

END

Regards,

Keerthi KS

• 1. Re: Negative Values

[CancelledSaleValue]*-1

• 2. Re: Negative Values

Hi, Keerthi

Try ([CancelledSaleValue] * -1)

Best Regards

• 3. Re: Negative Values

I have added Status as Columns. Status is Confirmed and Cancelled.

All values with Cancelled should be negative.

When i change value of Salevalue to [Salevalue]*-1. Everything will change to Negative. I guess there is something mistake in my Calculated fields.

Is there any other to Check for Difference between two

• 4. Re: Negative Values

Could u send yr VIZ to check ...

• 5. Re: Negative Values

Hi Keerthi,

From your query it seems that you want to make measure values negative for those who has status as cancelled.

So, if this is the requirement then just add '-' in front of you measure values.Like below:

Case [SalesViewBy]

When "Gross" then Sum(

If [Order Status (group)]='Confirmed' then [Sale Value]

ELSEIF [OrderStatus]='Cancelled' then -[CancelledSaleValue]

END)/10000000

When "Unit" then

Countd(

If [Order Status (group)]='Confirmed' then [Unit ID]

ELSEIF [OrderStatus]='Cancelled' then  -[CancelUnitID]

END)

When "Area" then Sum(

If [Order Status (group)]='Confirmed' then [Saleable Area]

ELSEIF [OrderStatus]='Cancelled' then  -[CancelSaleableArea]

END)

END

I guess you are looking for this only.

Hope this helps!

Regards,

Jayshree Dawrewar

1 of 1 people found this helpful
• 6. Re: Negative Values

I have changed the Calculated field. but its not coming for CancelUnitID

Case [SalesViewBy]

When "Gross" then Sum(

If [OrderStatus]='Cancelled' then -[CancelledSaleValue]

ELSE [Sale Value]

END)/10000000

When "Unit" then

Countd(

If [OrderStatus]='Cancelled' then -[CancelUnitID]

ELSE [Unit ID]

END)

When "Area" then Sum(

If [OrderStatus]='Cancelled' then -[CancelSaleableArea]

ELSE  [Saleable Area]

END)

END

• 7. Re: Negative Values

Have another calculated field with below condition and use it for display

CancelledSaleValue_Calcuated

If [OrderStatus]='Cancelled' then -1 * [CancelledSaleValue]

else

0

end

• 8. Re: Negative Values

Can yo please share the workbook or excel with sample data so that we can try?

• 9. Re: Negative Values

Dear Jayshree,

Regards,

Keerthi KS

• 10. Re: Negative Values

Unable to open the attached twbx file.

• 11. Re: Negative Values

can you check again ?

• 12. Re: Negative Values

Hi Keerthi,

Sory for the delay.

what's the version of the file as even i cant open it?

Regards,

Jayshree Dawrewar