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
Hi, I am looking to add a new column that will go through all of the 'Scores' I have and check what type it is. If it is Type A I want to divide the 'Score' by 50 and if it is Type B to divide the 'Score' by 25.
Exmaple below:
Project | Score | Type | Answer |
Project 1 | 100 | A | 2 |
Project 2 | 75 | B | 3 |
Project 3 | 25 | A | 12.5 |
Solved! Go to Solution.
New calculated column:
NewColumn = SWITCH(
TRUE(),
[Type] = "A", DIVIDE( [Score], 50, 0 ),
[Type] = "B", DIVIDE( [Score], 25, 0 ))
This should get you what you asked for.
Regards,
Hi, it seems putting in the word SWITCH is giving me an error
"Expression.Error: The name "SWITCH" wasn't recognized. Make sure it's spelled correctly."
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 |
---|---|
121 | |
86 | |
77 | |
55 | |
48 |
User | Count |
---|---|
136 | |
128 | |
78 | |
64 | |
63 |