Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Create mapping column based on multiple columns

Hello,

I am new to power bi.

And im kind of stuck with one scenario.

Please consider following table as my Input table:

 

IDResponsible PersonDomainOrg Unit
1ABCA 
2XYZ UN1
3PQR  
4XYZ  
5ABC UN1
6MNOA 
7MNO  
8EFG  
9EFGA 
10ABC  

 

Now i need to visualize it as how many applications are there by per region. But region is not included in input table.

So i created a new mapping table. Region is derived by Respnsible person. Each distinct Responsible person is assigned for per region. Which i was able to achieve. But there was new regions addded which were not dependant on Responsible person but are responsible on column Domain and Org Unit.

 

So now what i want is where Domain is "A" is assigned to Region "Reg1".

Also where Org Unit is "UN1" is assigned to "Reg2".

And previous condition for deriving regions remains same(with responsible person).

 

I tried to achieve it by Conditional Column but it doesnt work properly.

The count doesnt match.

 

Can anyone please suggest me how do i approach this scenario.

 

Thanks in Advance..!!!

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

Try to build a calculated column by switch function.

Region =
SWITCH (
    TRUE (),
    'Table'[Domain] = "A", "Reg1",
    'Table'[Org Unit] = "UN1", "Reg2",
    'Table'[Responsible Person]
)

Result is as below.

1.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

Try to build a calculated column by switch function.

Region =
SWITCH (
    TRUE (),
    'Table'[Domain] = "A", "Reg1",
    'Table'[Org Unit] = "UN1", "Reg2",
    'Table'[Responsible Person]
)

Result is as below.

1.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.