Case statement in a calculation get rid of the ( )'s

This topic has 0 replies, 1 voice, and was last updated 5 years, 10 months ago by Frank.

  • Author
    • #305
      • Topics Started - 80
      • Replies Written - 53

      If you have multiple conditions to test for in a calculation you can use nested Iif’s or you can use a Case statement.

      The syntax for a Case statement in Stratum would look something like this:
      CASE statements can be used in Viewer calculated measure expressions. Syntax is shown below.


      CASE [Customer SoldTo].[Customer SoldTo].Properties(“SldTo Long Description”)

      WHEN “Midwest Providers” THEN 1

      WHEN “North Providers” THEN 2

      WHEN “South Providers” THEN 3

      ELSE 99



      Of course what you are checking for could be things like the the CurrentMember or a measure value greater than or less than a number of values.

      We’ve used this to set a value to different values in a calculated columns so that we can set a Conditional Format on a number of different conditions.

      The nice thing about the Case statement (IMHO) is that you don’t have to deal with getting the parentheses to match up….I seem to be “(” challenged.

      • This topic was modified 5 years, 10 months ago by Frank.
Viewing 0 reply threads

You must be logged in to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


©2022 KLEO Template a premium and multipurpose theme from Seventh Queen

Log in with your credentials


Forgot your details?