7 Replies Latest reply on Apr 10, 2018 1:36 PM by Jim Van Sistine

Here is the current calculation for the field:

I want to add another criteria element that distinguishes CLASS (another field) to either PPA or CA in which 1 represents PPA and 3 CA.

I thought that adding AND at the end of the above e.g. AND (IF  [Class] =1 THEN ......

Now I'm stuck.

Hi Bill,

Are you looking for 2 different values for Loss then?

Seems like you could either create a calculated dimension:

IF [Class] = 1 then 'PPA'

ELSEIF [Class]=3 then 'CA'

END

...which you could then use on rows or columns to separate your existing calculation further.

OR, create 2 separate calculated measures:

SUM(IF [Account Code]=16 AND [Class] = 1 then [Amount] END) -- PPA_Amount

SUM(IF [Account Code]=16 AND [Class] = 3 then [Amount] END) -- CA_Amount

Seems like either approach could work, depending on your needs.

Hope this helps,

- Jim

Jim;

Thanks and Here is what I did.

THIS WORKS

This summarizes the Prem for Class 1 (PPA)

THIS WORKS

This summarizes the Losses for Class 1 (PPA)

Now I’m trying to create a ratio for to divide PPA Losses / PPA Prem

Here’s the old ratio that did not distinguish by Class 1 (PPA) or 3 (CA).

I WANT TO CORRECT THIS (ABOVE) SO IT CREATES A RATIO FOR  LOSSES PAID DIVIDED BY PPA PREMIUM

It doesn’t seem to be creating the ratio’s correctly e.g. Company 1238 below

Losses CA 842,526 divided by Premium CA = 272,641 should = 309%

Losses PPA 1,391,737 divided by Premium PPA 1,041,539 should = 133.6%

What am I doing wrong?

If the 2 calcs for Loss and Premium are working separately, couldn't you use those in your ratio calculation?

BINGO!!!!

EUREKA!!!!!

Thanks Jim!!!

No problem.  Glad you got it working!

- Jim

FYI, I’m a “newbie” to Tableau and your help/guidance was greatly appreciated!

Thank you again!

Bill