Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All ,
I need to put as logic like in one column
CASE WHEN
| TAC |
| TAF |
| TAI |
| TAT |
| TCA |
| TEA |
Then
Travel & Accomodation
When
| SRT |
| SSA |
| SSC |
| SSD |
| STC |
| SWS |
Then "SubContractor".
What is the easiest way to tranform.
I know Conditional formating
But want to know if there is any other quick way to do,
Thanks
Solved! Go to Solution.
Hi @ashmitp869 - you can create a new column using SWITCH function as below:
ExpenseCategory =
SWITCH(
TRUE(),
'Expenses'[ExpenseCode] IN {"TAC", "TAF", "TAI", "TAT", "TCA", "TEA"}, "Travel & Accomodation",
'Expenses'[ExpenseCode] IN {"SRT", "SSA", "SSC", "SSD", "STC", "SWS"}, "SubContractor",
"Other"
)
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @ashmitp869 - you can create a new column using SWITCH function as below:
ExpenseCategory =
SWITCH(
TRUE(),
'Expenses'[ExpenseCode] IN {"TAC", "TAF", "TAI", "TAT", "TCA", "TEA"}, "Travel & Accomodation",
'Expenses'[ExpenseCode] IN {"SRT", "SSA", "SSC", "SSD", "STC", "SWS"}, "SubContractor",
"Other"
)
Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |