
1. Re: Sintaxis: How to create a Calculated Field for with multiple condition formulas?
Cédric Tran Nov 3, 2018 4:21 AM (in response to Raquel Garcia)Hi,
Does this represent only one calculation formula ?
SUM (IF ([E1_Nca]) = 1
then ([Resp_pond]) END) / sum (IF ([E1_Nca]) <> 0 then ([Resp_pond]) END)
SUM (IF ([E1_Nca]) = 2
then ([Resp_pond]) END) / sum (IF ([E1_Nca]) <> 0 then ([Resp_pond]) END)
SUM (IF ([E1_Nca]) = 3
then ([Resp_pond]) END) / sum (IF ([E1_Nca]) <> 0 then ([Resp_pond]) END)
If your answer is yes, you should start to replace the logical syntaxe by something like this:
SUM(
CASE [E1_Nca]
WHEN 1 THEN Calculation_To_Be_SumUp1
WHEN 2 THEN Calculation_To_Be_SumUp2
WHEN 3 THEN Calculation_To_Be_SumUp3
END
)
Cedric

2. Re: Sintaxis: How to create a Calculated Field for with multiple condition formulas?
Raquel Garcia Nov 5, 2018 8:25 AM (in response to Cédric Tran)Thank you very much for your suggestion, Cédric.
De: Cédric Tran
Enviado el: viernes, 02 de noviembre de 2018 20:16
Para: Raquel Garcia
Asunto: Re:  Sintaxis: How to create a Calculated Field for with multiple condition formulas?
<https://community.tableau.com/?et=watches.email.thread> Tableau Community Forums
Sintaxis: How to create a Calculated Field for with multiple condition formulas?
reply from Cédric Tran <https://community.tableau.com/people/cdric.tran?et=watches.email.thread> in Forums  View the full discussion <https://community.tableau.com/message/840372?et=watches.email.thread#840372>

3. Re: Sintaxis: How to create a Calculated Field for with multiple condition formulas?
Cédric Tran Nov 5, 2018 8:30 AM (in response to Raquel Garcia)Hi Raquel,
If it is Correct, could you please marked is as "Correct" ? It won't appear on the unanswer question anymore after that.
Thanks

4. Re: Sintaxis: How to create a Calculated Field for with multiple condition formulas?
Raquel Garcia Nov 6, 2018 12:30 AM (in response to Cédric Tran)Hi Cédric,
Thank you for your answer.
Probably it works. But I do not know how to use it.
I am completly new with Tableau. And the sintaxis is really too "tricky" for me at this point.
In fact, my own formula, even only with 1 line, is reporte as "valid" by the syntax editor. But it does not work in fact.
So I have put this all on hold, and I will be releasing an easier chart.
Best regards,
Raquel