How to do conditional or IF, THEN, ELSE in calculated fields?

FacebookLinkedInStumbleUponTwitterShare

Question:

Is it possible to do conditional or IF, THEN, ELSE in calculated fields of report DataPages?

 

Answer:

Here is a conditional calculation involving numbers:

 

CASE

WHEN [@field:FieldName]=.25 THEN 0

WHEN [@field:FieldName]=1 THEN 1

ELSE 2

END

 

 

Here is a conditional calculation involving text:

 

CASE

WHEN [@field:FieldName]=.25 THEN 'YOU MUST TAKE ACTION'

WHEN [@field:FieldName]=1 THEN 'NO ACTION IS REQUIRED'

ELSE 'OKAY'

END

 

 

Contact Support

Leave a Reply

 
© 2011 Caspio, Inc. All rights reserved! Sitemap | Terms of Use | Privacy Statement Suffusion theme by Sayontan Sinha