Forum Discussion
Matrix - Display Values above Columns
- 8 years ago
Hi dancarr22,
For Power BI Matrix visual, the value level shows below the column level. Based on your screenshot, I create the similar structure data sample as follows.
Then I create Matix visual like you.
If you want to display data like the format in Tableau, you need to unpivot Value and SpreadCost columns. Please right click your table->Query Editor->select both Value and SpreadCost columns->Unpivot columns(see the button highlighted in yellow background), click apply, you will get the data shown in screenshot.
Then select the Ticker as Row level, the Attribute and MarkerTicker as column level, the Value.1 as Value level, you will get expected result.
Best Regards,
Angelia
this is not a practical solution when the table to be unpivoted has 30 fields.
There needs to be a simple way to do this in power bi like there is in excel.
Hi apatnola ,
This answer is from 3 years ago, since then the tool has evolve significantly depending on what you are looking for there are other options. Currently there are calculated groups, options to unpivot only, selected columns or the use of a disconnected table.
What is the result you want to achieve and how is your data is setup?
You compare Power BI with Excel but in both cases if you have the incorrect data format the results will not be achived corretly. Altough the tools look similar they are in fact very different because they are used for different purposes.
Can you share a mockup of your data and expected result?
- apatnola5 years agoHelper I
I am trying to get from
to
Here are the specific fields I have picked so far.
In excel's pivot table fields, you just switch the values and the column headers, that's it. Hopefully, there is a power bi solution short of creating individual measures for each column/value combination that needs to be maintained over time.
- MFelix5 years agoSuper User
Hi apatnola
Be aware that Power BI works in tabular models so it's not exactly the same has in excel, and the concept diverge.
In this case where you have the information in this setup you need to unpivot your data, however with the power query working behind the scenes all the heavy work will be done by the application you only need to setup once, and every time it refreshes they query is run.
Is the information of your data in the format you present or is it just the final result that you are already presenting?
If you have the data in the format you are presenting and the data tends to grow you will need to pick the first 3 columns on your data (District, Showroom and year) and unpivot the other columns this is an option within power bi.
If the information is in the table format like this:
District -Showroom - Year - Retail - Pieces
All you need to do is selected the Retail and Pieces and simply use the new columns (attribute and values) on your visualizations, that will allow additional features.
I understand the "need" to do comparisions and altough I work with Power BI from the beginning I still get frustated with some things, but in the end we are talking about different tools that work in different ways and with different purposes.
- apatnola5 years agoHelper I
Thank you Miguel. This is super helpful. I have 15 requested items to visualize. Let me work through the others as there may be other datapoints that i will need to pivot on.
The table the information is coming from is a very detailed table (barcode level) with 30 fields.
Also, there is no "year" in the detailed table exactly. Just a posted date joined to my calendar table. Will it work if i pivot on District - Showroom - Posted Date?
Andre
- Ashish_Mathur5 years agoSuper User
Hi,
See if my solutoin here helps - Rearrange a multi heading dataset into a single heading one which is Pivot ready.