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
webportal
Impactful Individual
Impactful Individual

Transpose table in report visual

This is how my table looks like:

 

Capturar.JPG

 

In the 1st column, we have the year, and in the n remaining columns the indicators.

 

I'd like to build a matrix visual with the indicators in the rows and years in columns.

 

Now, I know I can unpivot all the columns except the year in the query editor. But the structure above is necessary to build charts where the x-axis is the year and the series is only one or two indicators.

 

Is there a way (a measure, calculated table or other) to build the matrix I need?

 

Thanks!

1 ACCEPTED SOLUTION

The source data should always be equal. But you are right. Transformation steps won't be duplicated.

 

If this is your intenstion use reference (one below) instead of duplicate.

 

Then the source of your second query isn't the original source (database?) but the first query.

 

Every transformation step will be "forwarded" to your new query. So you'll keep all your changes and only unpivot the second query.

 

 

View solution in original post

9 REPLIES 9
v-yulgu-msft
Employee
Employee

Hi @webportal,

 

Agree with supder, the current table structure doesn't match the matrix visual. To achieve your goal, you have to unpivot columns, as it is not available to do that using DAX, as supder mentioned, the best choice is duplicating your source table.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

I know it doens't match the matrix. The problem is that by duplicating and unpivoting the table, I'll have two tables which are not synchronized. That is, changes in the original table will not be reflected on the tranposed table.

The source data should always be equal. But you are right. Transformation steps won't be duplicated.

 

If this is your intenstion use reference (one below) instead of duplicate.

 

Then the source of your second query isn't the original source (database?) but the first query.

 

Every transformation step will be "forwarded" to your new query. So you'll keep all your changes and only unpivot the second query.

 

 

spuder
Resolver IV
Resolver IV

hi @webportal

 

i think this is not possible. Maybe it helps when you duplicate your source in Query Editor. Then you can use one to unpivot and the other one default.

 

If you have performance problems try not to duplicate but to reference to the default source.

webportal
Impactful Individual
Impactful Individual

Hello @spuder

 

Thanks for your help. Actually, if I duplicate then the values will not be in synch, right?

@webportal

 

it will. The duplicate will be handled as a normal query and will be updated with every refresh.

webportal
Impactful Individual
Impactful Individual

Ok, explain 🙂

as I said.

 

Open the query editor and duplicate your query. Then you can the original one use for the visuals where this format is neccessary and the duplicate you can unpivot and use this one in the visuals where unpivoted data where needed.

 

example.jpg

webportal
Impactful Individual
Impactful Individual

That's great, but the two tables are not in synch.

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.