March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello guys,
I would like to ask you for help.
I have two columns A(last measurement) and B(previous measurement) with numbers 0-5. I need to compare numbers in column A with column B and make condition to add results to new columns C(trend).
3 Conditions:
- if number in column A is less then number in Column B then add number 1 to columns C
- if number in column A is equal to number in Column B then add number 2 to columns C
- if number in column A is bigger then number in Column B then add number 3 to columns C
Then I will use this new Column C and create conditional formating with 3 arrow icons for showing if last measurement is bigger, equal to or less then previous measurement.
Maybe my solution is wrong or too complicated.
Thank you for help
Solved! Go to Solution.
Hello guys,
sorry for last reply, I solved this task with
column C =
if column A < column B, 1,
if column A = column B, 2,
if column A > column B, 3
)
Thank you all so much you tried help me.
Hello guys,
sorry for last reply, I solved this task with
column C =
if column A < column B, 1,
if column A = column B, 2,
if column A > column B, 3
)
Thank you all so much you tried help me.
Hi @Anonymous ,
You can use below code:-
column C =
SWITCH (
TRUE (),
column A < column B, 1,
column A = column B, 2,
column A > column B, 3
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
You need a switch() function to give multiple condition
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |