Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,I have data as below in the second picture. I need to create a calculated column based on the values of enter_by.1,enter_by.2 and so on. The data also has a region_id column. Have a mapping table as in picture1.
Would like to create something like below based on the information I have -
if [region_id]=1 then
(if [enter_by.1]="ODB" then "ODB" else if [enter_by.2]="ODB" then "ODB" else if [enter_by.3]="ODB" then "ODB" else if [enter_by.4]="ODB" then "ODB" else if [enter_by.5]="ODB" then "ODB" else if [enter_by.6]="ODB" then "ODB" else if [enter_by.7]="ODB" then "ODB" else if [enter_by.8]="ODB" then "ODB" else if [enter_by.9]="ODB" then "ODB" else if [enter_by.10]="ODB" then "ODB" else if [enter_by.11]="ODB" then "ODB" else if [enter_by.12]="ODB" then "ODB" else if [enter_by.13]="ODB" then "ODB" else if [enter_by.14]="ODB" then "ODB" else if [enter_by.16]="ODB" then "ODB" else if [enter_by.17]="ODB" then "ODB" else if [enter_by.18]="ODB" then "ODB" else if [enter_by.19]="ODB" then "ODB" else if [enter_by.20]="ODB" then "ODB" else if [enter_by.21]="ODB" then "ODB" else if [enter_by.22]="ODB" then "ODB" else if [enter_by.23]="ODB" then "ODB" else if [enter_by.24]="ODB" then "ODB" else if [enter_by.25]="ODB" then "ODB" else if [enter_by.26]="ODB" then "ODB" else if [enter_by.27]="ODB" then "ODB" else if [enter_by.28]="ODB" then "ODB" else null)
else
if [region_id]=2 then
(if [enter_by.1]="BDB" then "BDB" else if [enter_by.2]="BDB" then "BDB" else null)
else null
Any ideas will be really helpfule. Please let me know for more clarifications.
@Anonymous what you want to achieve the end result? Just calculated column? How you want to use it? THe formula you showed what is the problem wiht that?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks for replying.
Can I achieve something like this using DAX?
I had written the formula in Power Query and was working there.
What about using nested ifelse in DAX for a calculated column?
WHat is the best practice?
@Anonymous yes you can surely achieve the same with DAX
My Column in Dax = if( Table[Column] = Value, <then condition>, if( Table[Column] = Valie, <then condition>, <else condition> ) )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.