8 Replies Latest reply on Jul 6, 2018 2:39 PM by Deepak Rai

# Calculations

IF [PROPERTY_STATE] = 'CT' THEN 60

ELSEIF [PROPERTY_STATE] = 'CO' THEN 35

ELSEIF [PROPERTY_STATE] = 'MD' THEN 45

ELSEIF [PROPERTY_STATE] = 'MS' THEN 45

//If([Prop State]="MA" And Not(Match([Breach Letter Desc];"*150*"));90;

//If([Prop State]="MA" And Match([Breach Letter Desc];"*150*");150;

ELSEIF [PROPERTY_STATE] = 'NC' THEN 45

ELSEIF [PROPERTY_STATE] = 'NJ' THEN 33

ELSEIF [PROPERTY_STATE] = 'NY' THEN 90

ELSEIF [PROPERTY_STATE] = 'NY' THEN 60

ELSEIF [PROPERTY_STATE] = 'RI' THEN 35

ELSEIF [PROPERTY_STATE] = 'OK' THEN 35

ELSE 30 END

Can I please get help in the calculation where I commented out the logic. This logic was used in business object report. what function should be used instead of Match in tableau

• ###### 1. Re: Calculations

You want to use the CONTAINS function to do the match that you're trying to do.

All the string functions can be found here:

1 of 1 people found this helpful
• ###### 2. Re: Calculations

//If([Prop State]="MA" And Not(Match([Breach Letter Desc];"*150*"));90;

If([Prop State]="MA" And Not CONTAINS([Breach Letter Desc],"150"))THEN 90 END

//If([Prop State]="MA" And Match([Breach Letter Desc];"*150*");150;

If([Prop State]="MA" And CONTAINS([Breach Letter Desc],"150")THEN 150 END

1 of 1 people found this helpful
• ###### 3. Re: Calculations

So you want this:

elseIf [Prop State]="MA"

then if CONTAINS([Breach Letter Desc];"150" then 150 else 90 END

elseif ... (the rest of your calc)

• ###### 4. Re: Calculations

A little CORRECTION

IF [PROPERTY_STATE] = 'CT' THEN 60

ELSEIF [PROPERTY_STATE] = 'CO' THEN 35

ELSEIF [PROPERTY_STATE] = 'MD' THEN 45

ELSEIF [PROPERTY_STATE] = 'MS' THEN 45

ELSEIf([Prop State]="MA" And Not CONTAINS([Breach Letter Desc],"150"))THEN 90

ELSEIf([Prop State]="MA" And CONTAINS([Breach Letter Desc],"150")THEN 150

ELSEIF [PROPERTY_STATE] = 'NC' THEN 45

ELSEIF [PROPERTY_STATE] = 'NJ' THEN 33

ELSEIF [PROPERTY_STATE] = 'NY' THEN 90

ELSEIF [PROPERTY_STATE] = 'NY' THEN 60

ELSEIF [PROPERTY_STATE] = 'RI' THEN 35

ELSEIF [PROPERTY_STATE] = 'OK' THEN 35

ELSE 30 END

Thanks

Deepak

If it Helps, Pl mark it Helpful and CORRECT to Close Thread

1 of 1 people found this helpful
• ###### 5. Re: Calculations

Thank you

• ###### 6. Re: Calculations

Thank you

• ###### 7. Re: Calculations

correct. Thanks

• ###### 8. Re: Calculations

Hi Syed,

Great it worked for you. Can you please take a sec to Close Thread by Marking my Reply as CORRECT. The CORRECT button is under my REPLY in your this main Thread, Not in Email. This will help others.

Thanks

Deepak

1 of 1 people found this helpful