8 Replies Latest reply on Apr 7, 2015 10:07 PM by Sankarmagesh Rajan

# -CASE(MINUS CASE) CONDITION

hi everyone, can i get the clarification of -CASE CONDITION,what is the use for -condition in calculation...?

• ###### 1. Re: -CASE(MINUS CASE) CONDITION

We use Case statments to verfify the condition & hard coded.

And we use Case Statements to check mukltiple connditions as well.

For an Example,

case  [Region]

when "East" then "Treeritoty1"

when "Wset" then "Treeritoty1"

when "South" then "Treeritoty1"

when "North" then "Treeritoty2"

else "No-Territory option for this Region"

end

And we use Case Statements to check multiple connditions as well.

case  [Region]

when [Region] = "East" and sum([Sales]) >10000  then "Treeritoty1 & Good"

when [Region] = "East" and sum([Sales]) <=10000  then "Treeritoty1 & Average"

when [Region] = "West" and sum([Sales]) >10000  then "Treeritoty1 & Good"

when [Region] = "West" and sum([Sales]) <=10000  then "Treeritoty1 & Average"

when [Region] = "North" and sum([Sales]) >10000  then "Treeritoty2 & Good"

when [Region] = "North" and sum([Sales]) <=10000  then "Treeritoty2 & Average"

when [Region] = "South" and sum([Sales]) >10000  then "Treeritoty2 & Good"

when [Region] = "South" and sum([Sales]) <=10000  then "Treeritoty2 & Average"

end

Best Regards

Laxman Kumar

• ###### 2. Re: -CASE(MINUS CASE) CONDITION

hi kumar, thank you for your replay.. i know the use of case statement but here am asked for the differences or meaning of "- Case" like

-CASE [Sort by]

WHEN "Average" THEN WINDOW_AVG([Difference from Average])

WHEN "Most Recent" THEN LOOKUP([Difference from Average],LAST())

WHEN "Min" THEN -WINDOW_MIN([Difference from Average])

WHEN "Max" THEN WINDOW_MAX([Difference from Average])

END

• ###### 3. Re: -CASE(MINUS CASE) CONDITION

Hi Felix

When we use the -case then it will reverse

see image

• ###### 4. Re: -CASE(MINUS CASE) CONDITION

Hi Felix

It will give us Negative values like

ex sales axis stated with 0 100 200 300 etc

if we use - case then -0 -100 -200 -300 etc

Thanks

sankar

• ###### 5. Re: -CASE(MINUS CASE) CONDITION

As Sankar Rajan Explained,

-Case eaqual to multiplication of -1.

• ###### 6. Re: -CASE(MINUS CASE) CONDITION

Hi Sankar, your replay is very helpful for me. and one more doubt i have that is what kind of situations we can use "-case statement"...?if you don't mind can you explain that

Felix

Thanks &Regards

• ###### 7. Re: -CASE(MINUS CASE) CONDITION

hi Felix,

Some time we can create chart with - values.

like histograms.

we can have positive bins. so we can use the negative bins to achieve this.

see image

1 of 1 people found this helpful
• ###### 8. Re: -CASE(MINUS CASE) CONDITION

Hi Felix,

You got answer then mark this as correct or help.

Thanks

sankar