Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, Power BI Forums.
I'm creating a table in Power BI using the data in the image below.
Like the other images I shared, I want to display dates under each measure. In Tableau, I adjusted the dimensions by moving the measure items between columns and rows, but this doesn't seem possible in Power BI. I tried switching rows and columns in Power Query, but it didn't work because some of the values have different units. Is there a way to do this? Thanks in advance.
Solved! Go to Solution.
To expand on the answer from @Shahid12523.
It is not what would be considered best practice modelling in Power BI.
To do this, in Power Query...
It means instead of simple measures, you have to do this...
sales = CALCULATE(SUM(t[Value]), t[Attribute] = "sales_amt")
So for every measure, you end up having to filter based on attribute.
If you do what is suggested, and just...
_value = SUM(t[Value])
It will work in the matrix...
But if you ever don't have the attribute, the measure will SUM everything in the value column...
This makes it easy to get incorrect answers.
Just make sure you understand the approach before complicating the model.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
Hi @DanielKH ,
I would also take a moment to thank @KNP , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi @DanielKH ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.
Power BI requires a specific data structure.
Unpivot your data in Power Query. Select all your measure columns, then go to Transform > Unpivot Columns. This creates an "Attribute" column (measure names) and a "Value" column.
Use the "Attribute" column in your matrix visual's rows or columns to achieve the Tableau-like layout.
To expand on the answer from @Shahid12523.
It is not what would be considered best practice modelling in Power BI.
To do this, in Power Query...
It means instead of simple measures, you have to do this...
sales = CALCULATE(SUM(t[Value]), t[Attribute] = "sales_amt")
So for every measure, you end up having to filter based on attribute.
If you do what is suggested, and just...
_value = SUM(t[Value])
It will work in the matrix...
But if you ever don't have the attribute, the measure will SUM everything in the value column...
This makes it easy to get incorrect answers.
Just make sure you understand the approach before complicating the model.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
1.Unpivot sales_amt and sales_qty in Power Query to create a single column for values and a column for measure type.
2.Use a Matrix visual in Power BI:
- Rows: MeasureType (e.g., sales_amt, sales_qty)
- Columns: dt (dates)
- Values: Value
It may be possible but will likely be complicated.
We could debate how easy this should be or, an alternative, would this layout be acceptable?
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |