Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
How do I change axes in a matrix so that my rows become columns and vice versa? Currently I have a date_string value as my Rows, and the other aggregates as Values. But when I try adding this date_string value as a Column instead, it groups all of my aggregate measures under each date_string value. I want my measure values to display from top down, not left to right. How do I do this?
I have something like this:
date_str A B C 201601 A1 B1 C1 201602 A2 B2 C2 201603 A3 B3 C3
But I want it to look like this:
201601 201602 201603 A A1 A2 A3 B B1 B2 B3
Thanks, Ravi. does Pivot Column only work one column at a time? I tried using this function, but I couldn't figure out how to aggregate the data. After doing Pivot Column and choosing one of the metrics to pivot on, it still listed all of my metrics in the header row instead of column row. "Transport Month" is the name of my date_str column that I want to pivot, and Total_Volume is the name of one of my metrics that I want listed in one row instead of one column.
hi @ironryan77
Follow this steps:
1.Your original table
2.Select A,B,C and click to Unpivot Columns
the results is:
2.Select Date_Str and click to Pivot Column
And the results is:
Thank you Victor. I actually have more than one Attribute column; will Pivot Column still work in this case? Or do I need to string all of my Attribute Columns together into one column to use as the Pivot?
Also, I couldn't figure out which Value to Pivot on. (I have more than one Value column too). When I tried Pivoting on just one Value column, I got this error below (Transport Month was my date_str column):
This was the error details:
Error Message: Something's wrong with one or more fields: (Payor_Scorecard_All_Payors_Final_PROD) Transport Month Stack Trace: Invocation Stack Trace: Activity ID 20eaf971-21ad-d55b-4801-d5fbcea2fc5a Time Wed Oct 05 2016 13:58:38 GMT-0500 (Central Daylight Time) Version 2.38.4491.282 (PBIDesktop) Client Error Code Missing_References
Can you put some sample table and the result that you expected?
With this input i'll try to think a solution.
OK existing sample data:
date_str Attribute1 Attribute2 Value1 Value2 Value3 201601 A1 B1 C1 D1 E1 201602 A2 B2 C2 D2 E2 201603 A3 B3 C3 D3 E3
Here is how I want this to look:
201601 201602 201603 Value1 C1 D1 E1 Value2 C2 D2 E2 Value3 C3 D3 E3
The attributes are not relevant to the final output because the attributes are all slicer selections. Which attributes appear depend on their selection. Make sense?
I assume you have a table like below:
However, you should have Value category column and date_string column in your source table, your raw data should be like:
So for your requirement, you just need to put the Value type into row group and date_str into column group.
Regards,
Thank you, but when I tried putting my values in Rows, it no longer summed them. Now it just has a list of all Total Volume and TTM Volume values as below:
In matrix, we should put dimension field in rows and columns which are used to slice fact data. You can't put the fact data field into Rows. It will return nothing but a grand total.
Regards,
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
96 | |
91 | |
82 | |
69 |
User | Count |
---|---|
159 | |
125 | |
116 | |
111 | |
95 |