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
seenukancharla
Frequent Visitor

How to transpose columns to rows in powerbi?

Hi everyone,

 

                   I have a requirement like this,

for example  Sales table 

Spoiler

C1

C2

C3

C4

C5

1

RAJ

SALES

1000

HYD

2

SIRI

MARKETING

NULL

CHE

3

LOHI

HR

2000

BANG


i want output like this

filter SLICER

C5

HYD

CHE

BANG

when i click on hyd, the output has to show like this

COLUMNS

VALUES

C1

RAJ

C2

SALES

C3

1000

C4

HYD

 

i tried with transpose columns to rows in edit query but the problem is it is not showing column containing null value  means

 IT shows the output like this when i click on "che" ,it eliminating the "null"  containg value completely

COLUMN

VALUES

C1

2

C2

SIRI

C5

BANG

 

Any workaround using dax 

Thanks in advance.

 

Thanks & Regards,

Seenu.

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@seenukancharla ,

 

I would suggest you use python function like pandas.melt() to unpivot the columns.

 

Regards,

Jimmy Tao

Mariusz
Community Champion
Community Champion

HI @seenukancharla 

 

You can select columns C1, C2, C3 and C4, and go to Transform Ribon > Unpivot Columns.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski


 

Hi,

 

          Thanks for ur response,ya  i know but the problem is ,when i work with that approach it is not showing the "null" value containing ,But i want null values also That's why iam looking for another approach.

 

Thanks&Regards,

Seenu.

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.