Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, in below table, I would like to retrieve a string value by comparing to the other 3 columns, Category, Rank & Pin with below conditions:
1. If the Rank is "OE", then the result shall be "OE".
2. If the Pin is Stud or Studless, then the result shall be "Stud" or "Studless".
3. Else, it shall follow Category, either "PR" or "LT".
No | Category | Rank | Pin | Desired Outcome |
Y1 | PR | RE | Others | PR |
N3 | PR | RE | Stud | Stud |
P1 | PR | OE | Others | OE |
S1 | LT | RE | Studless | Studless |
A2 | LT | RE | Others | LT |
Thanks.
Regards, LC
Solved! Go to Solution.
@Tan_LC , You can get the desired result by creating a custome column go to modelling view select new column
dax
DesiredOutcome =
SWITCH(
TRUE(),
'YourTable'[Rank] = "OE", "OE",
'YourTable'[Pin] = "Stud", "Stud",
'YourTable'[Pin] = "Studless", "Studless",
'YourTable'[Category] = "PR", "PR",
'YourTable'[Category] = "LT", "LT",
BLANK()
)
Replace table name
Proud to be a Super User! |
|
@Tan_LC , You can get the desired result by creating a custome column go to modelling view select new column
dax
DesiredOutcome =
SWITCH(
TRUE(),
'YourTable'[Rank] = "OE", "OE",
'YourTable'[Pin] = "Stud", "Stud",
'YourTable'[Pin] = "Studless", "Studless",
'YourTable'[Category] = "PR", "PR",
'YourTable'[Category] = "LT", "LT",
BLANK()
)
Replace table name
Proud to be a Super User! |
|
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
7 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |