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.
This is how my table looks like:
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!
Solved! Go to 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.
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
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.
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.
Hello @spuder
Thanks for your help. Actually, if I duplicate then the values will not be in synch, right?
it will. The duplicate will be handled as a normal query and will be updated with every refresh.
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.
That's great, but the two tables are not in synch.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |