Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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! |
|
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |