HI Guys
I am trying to write this expression and having difficulty.
Can someone help?
If([Tank or Gauge Name]=โ66018โ,[Tank or Gauge Name]=โSales Tank #1โ,[Tank or Gauge Name]=โ11955โ,
[Tank or Gauge Name]=โ25293,[Tank or Gauge Name]=โ1230โ,[Production, Bbls]-27,
or([Tank or Gauge Name]=โ1231โ,[Production, Bbls]-0,
or([Tank or Gauge Name]=โ21469โ,[Production, Bbls]-44,
or[Tank or Gauge Name]=โ11978โ,[Production, Bbls]-19,""))
I have multiple conditions to evaluate and furmulate based on that condition to calculate the value
Solved! Go to Solution.
I was able to work up a solution
Here it is
IFS(
([Tank or Gauge Name]= "66018"),[Production, Bbls]-27,
([Tank or Gauge Name]="Sales Tank #1"),[Production, Bbls]-27,
([Tank or Gauge Name]="11955",),[Production, Bbls]-27,
([Tank or Gauge Name]="25293",),[Production, Bbls]-27,
([Tank or Gauge Name]=โ1230โ),[Production, Bbls]-27,
([Tank or Gauge Name]=โ1231โ),[Production, Bbls]-0,
([Tank or Gauge Name]=โ21469โ),[Production, Bbls]-44,
([Tank or Gauge Name]=โ11978โ),[Production, Bbls]-19,TRUE,"",)
Thanks for everyone who helped!
Some other ways to express it:
SWITCH(
[Tank or Gauge Name],
"66018", [Production, Bbls] - 27,
"Sales Tank #1", [Production, Bbls] - 27,
"11955", [Production, Bbls] - 27,
"25293", [Production, Bbls] - 27,
โ1230โ, [Production, Bbls] - 27,
โ1231โ, [Production, Bbls] - 0,
โ21469โ, [Production, Bbls] - 44,
โ11978โ, [Production, Bbls] - 19,
""
)
Or:
IFS(
IN(
[Tank or Gauge Name],
LIST(
"66018",
"Sales Tank #1",
"11955",
"25293",
โ1230โ
)
),
[Production, Bbls] - 27,
IN(
[Tank or Gauge Name],
LIST(โ1231โ)
),
[Production, Bbls] - 0,
IN(
[Tank or Gauge Name],
LIST(โ21469โ)
),
[Production, Bbls] - 44,
IN(
[Tank or Gauge Name],
LIST(โ11978โ)
),
[Production, Bbls] - 19
)
IF function receives three expressions. It seems that on your formula your using more then 3 options.
SEE:
Thank you, but I am not able to pharse the ifs() statement to simultaneously satisfy all the conditions and evaluate based on conditions.
I have 4 sets of condition to formulate 4 different outcomes
I don't know if i understand correctly but you should try to adapt the formula bellow:
IFS(
AND(condition 1, condition 2, condition 3, condition 4),
RESULT1,
AND(condition 5, condition 6, condition 7 condition 8),
RESULT2,
...
)
If this is not exactly what you looking for, please explaing what you're trying to do, maybe it'll clarify the solution!
Here is what I tried
IFS(
AND([Tank or Gauge Name]=โ66018โ,[Tank or Gauge Name]=โSales Tank #1โ,[Tank or Gauge Name]=โ11955โ,
[Tank or Gauge Name]=โ25293,[Tank or Gauge Name]=โ1230โ),
[Production, Bbls]-27,
AND([Tank or Gauge Name]=โ1231โ),[Production, Bbls]-0,
AND([Tank or Gauge Name]=โ21469โ),[Production, Bbls]-44,
AND([Tank or Gauge Name]=โ11978โ),[Production, Bbls]-19
Says
xpression 'IFS( AND([Tank or Gauge Name]=โ66018โ,[Tank or Gauge Name]=โSales Tank #1โ,[Tank or Gauge Name]=โ11955โ, [Tank or Gauge Name]=โ25293,[Tank or Gauge Name]=โ1230โ), [Production, Bbls]-27, AND([Tank or Gauge Name]=โ1231โ),[Production, Bbls]-0, AND([Tank or Gauge Name]=โ21469โ),[Production, Bbls]-44, AND([Tank or Gauge Name]=โ11978โ),[Production, Bbls]-0' was unable to be parsed: Number of opened and closed parentheses does not match.
I was able to work up a solution
Here it is
IFS(
([Tank or Gauge Name]= "66018"),[Production, Bbls]-27,
([Tank or Gauge Name]="Sales Tank #1"),[Production, Bbls]-27,
([Tank or Gauge Name]="11955",),[Production, Bbls]-27,
([Tank or Gauge Name]="25293",),[Production, Bbls]-27,
([Tank or Gauge Name]=โ1230โ),[Production, Bbls]-27,
([Tank or Gauge Name]=โ1231โ),[Production, Bbls]-0,
([Tank or Gauge Name]=โ21469โ),[Production, Bbls]-44,
([Tank or Gauge Name]=โ11978โ),[Production, Bbls]-19,TRUE,"",)
Thanks for everyone who helped!
Some other ways to express it:
SWITCH(
[Tank or Gauge Name],
"66018", [Production, Bbls] - 27,
"Sales Tank #1", [Production, Bbls] - 27,
"11955", [Production, Bbls] - 27,
"25293", [Production, Bbls] - 27,
โ1230โ, [Production, Bbls] - 27,
โ1231โ, [Production, Bbls] - 0,
โ21469โ, [Production, Bbls] - 44,
โ11978โ, [Production, Bbls] - 19,
""
)
Or:
IFS(
IN(
[Tank or Gauge Name],
LIST(
"66018",
"Sales Tank #1",
"11955",
"25293",
โ1230โ
)
),
[Production, Bbls] - 27,
IN(
[Tank or Gauge Name],
LIST(โ1231โ)
),
[Production, Bbls] - 0,
IN(
[Tank or Gauge Name],
LIST(โ21469โ)
),
[Production, Bbls] - 44,
IN(
[Tank or Gauge Name],
LIST(โ11978โ)
),
[Production, Bbls] - 19
)
User | Count |
---|---|
37 | |
30 | |
29 | |
20 | |
18 |