Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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."
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
84 | |
66 | |
49 |
User | Count |
---|---|
130 | |
110 | |
93 | |
70 | |
67 |