5 Replies Latest reply on Feb 18, 2018 10:56 PM by karuna patel

# logical expression using measure

not sure how should i do this. i am attaching the worksheet as well. i have Total\$ field in the attached worksheet which is the ordertotal.

i have a ordertotal amounts(total\$). and i need to create multiple tiers such as. ordertotal is measure,even if i convert that to discreate it does not work.

scenario is if ordertotal is between  1 and 5\$ shipping rate is 6\$

if ordertotal is between 5 and 10\$ shipping rate is \$6

if ordertotal is between 11 and 25\$ shipping rate is \$7

i am using below is givng me an error:

case  [Total\$] when '1' and '5' then [6]

when '5' and '10' then [6]

when '11' and '25' then [7]

when '25' and '50' then [8]

when '75' and '100' then [9]

else NA END

please help me establish the correct calculated field. thank you so much in advance.

• ###### 1. Re: logical expression using measure

CAn you please attached packaged workbook. This one is asking for database userid and password.

• ###### 2. Re: logical expression using measure

I am Not Sure You want Less than 5 or Less than Equal to 5 in First Line, but you can Change

IF OrderTotal>1 and OrderTotal<=5 THEN "\$6"

ELSEIF

OrderTotal<=10 THEN "\$6"

ELSE "\$7"

END

• ###### 3. Re: logical expression using measure

Thanks Deepak, I am new to Tableau.

Which state you live? Are you in USA?

Sent from my iPhone

• ###### 4. Re: logical expression using measure

Did it Work for you? If it  helped then please take  a sec to mark my reply Helpful and CORRECT to Close This Thread. The CORRECT button is under my Reply in  your Main Thread, not in Email. and Yes, I am in US In Phoenix, AZ.

Thanks

Deepak

• ###### 5. Re: logical expression using measure

thanks a lot deepak for your help!