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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Transpose mapping between two tables in Power BI

Hi All,

 

I have table 1 where we have age, Gender, Country ,Date and City fields. But these 4 information have been entered by different users in different manners. For eg. Alan have entered age in Field1 where asChris have entered Country in Field1 and so on.

 

crrt1.PNG

 

In Table2 - we have actual field which will map with Main Field and we can identify for eg. Field1 for Alan is Age and Field1 for Chris is Country.

crrt2.PNG

 

Provided the expected output below:

crrt3.PNG

 

How to achieve this in power bi? or How to align age, Gender, Country ,Date and City fields?

 

Thanks in Advance

 

Regards,

Prakash M

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , these can be steps.

 

1. Unpivot the first table (Main Field and value are the columns  )

2. Create a key both table main field and process. and merge two tables based on this key

3. remove Main Field if required

4. pivot Actual Field and Value

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Anonymous
Not applicable

Hi @amitchandak ,

 

I have 2 rows for Alan in Table 1 thus i am getting error and if i delete one of those 2 rows and then if i execute all the steps as per your suggetion then it is working. Could you please explain me in detail on how to get the expected output for 2 rows for single process.

 

Thanks in Advance

Prakash

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.