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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
PeterJansen2
Frequent Visitor

Pivot problem and mixed data

Hi,

 

I have a brainbuster (for me)

 

I have a table which I want to Pivot. All content is Text.

Pic1Pic1

I would like to Pivot the table to get the following result:

Pic2Pic2

This presents me with the following problems:

1) Pivot wont work because I have multiple rows with same EmplID and Code.

2) To solve that I thought of grouping, summerizing code 1000 and summerize code 2000. but that doesn't work because its is Text.

3) Converting Text to Numeric works only for the 1000 and 2000 code, which is all I need, but the other codes will present an error.

 

I think it I need multiple steps to solve this?

Split the Content column? (how?)

 

Any thoughts?

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @PeterJansen2,


 

3) Converting Text to Numeric works only for the 1000 and 2000 code, which is all I need, but the other codes will present an error.


If the other codes is not needed/necessary, you can replace the error values with null or 0(or any other values you want to show) after Converting Text to Numeric. Then you should be able use the Pivot option get your expected result. Smiley Happy

 

replceErrrors.PNGreplceErrrors2.PNG

 

Final result:

r1.PNG

 

Regards

View solution in original post

4 REPLIES 4
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @PeterJansen2,


 

3) Converting Text to Numeric works only for the 1000 and 2000 code, which is all I need, but the other codes will present an error.


If the other codes is not needed/necessary, you can replace the error values with null or 0(or any other values you want to show) after Converting Text to Numeric. Then you should be able use the Pivot option get your expected result. Smiley Happy

 

replceErrrors.PNGreplceErrrors2.PNG

 

Final result:

r1.PNG

 

Regards

chotu27
Post Patron
Post Patron

@PeterJansen2Use matrix Visual as below. will this work?Content.PNG

Thanks for your reply.

As far as I know, a visual won't do the trick. 

 

I need the pivotted data it in my tables, to do some calculations/measures etc with it.

 

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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