The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Dear All,
I want to build a new measure (could also be a new column if this fits better), based on a IF ELSE function.
Below you will see a small table, where one of the columns will be the condition in formula.
The idea is the following:
I am looking for a formula containing the following:
IF column 'Advies Goederenklasse' = 'Parellel', then the outcome need to be 10%
IF column 'Advies Goederenklasse' = 'Special', then the outcome need to be 5%
ELSE the outcome need to be 0
Thanks for any assistance in advance!
Kind regards,
Solved! Go to Solution.
Hi @Anonymous
you can use
SWITCH (
TRUE ( ),
[Advies Goederenklasse] = "Parellel", 0.1,
[Advies Goederenklasse]= "Special" , 0.5,
0
)
@Anonymous
Make sure it is a column not a measure and double check the spelling
Hi @Anonymous
you can use
SWITCH (
TRUE ( ),
[Advies Goederenklasse] = "Parellel", 0.1,
[Advies Goederenklasse]= "Special" , 0.5,
0
)
Thanks for sharing.
Unfortunaltely it doesnt work with me. The column [Advies Goederenklasse] hasnt been recognised as a column name, even when I define the table name in front of it.
@Anonymous
Make sure it is a column not a measure and double check the spelling
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
123 | |
85 | |
77 | |
55 | |
49 |
User | Count |
---|---|
135 | |
127 | |
78 | |
64 | |
63 |