Forum Discussion
BartVlek
6 years agoHelper II
IF or SWITCH multiple values not getting syntax right
Hi I am struggling with this: I need a new column in my model where I have the correct suppliers discount. There is a column SUPDISC but there are exceptions. So there are two columns that have a...
BartVlek
6 years agoHelper II
I transformed your suggestion to the actual situation. The shop doesn't have a name, but a number as you can see.
When I then copy-paste it to PBI-desktop and run, I receive a syntaxis error. What can it be? Do I not need to add the name of the table?
LEVKORTDEF =
SWITCH (
TRUE (),
[LEVERANCIER] = "ALDIPRESS"
&& [FIL] = "1", 65.00,
[LEVERANCIER] = "BETAPRESS"
&& [FIL] = "1", 60.00,
[LEVKORTING]
)
Anonymous
6 years agoNot applicable
Hi BartVlek ,
Please try to update the formula of your measure as below to remove double quotation since shop is number type:
| LEVKORTDEF = SWITCH ( TRUE (), [LEVERANCIER] = "ALDIPRESS" && [FIL] = 1, 65.00, [LEVERANCIER] = "BETAPRESS" && [FIL] =1 , 60.00, [LEVKORTING] ) |
If the above method didn't resolve your problem, please provide the screen shot of syntax error and related formula. Thank you.
Best Regards
Rena
- BartVlek6 years agoHelper II
Thank you !