Forum Discussion
Double Header and Secondary Column in Matrix Visual
- 1 year ago
Hi Jvo , Thank you for reaching out to the Microsoft Community Forum.
Based on your description, I took some sample data and worked out the solution.
Please refer attached .pbix file for reference and share your thoughts.If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Hi Jvo , Thank you for reaching out to the Microsoft Community Forum.
The most effective solution is to use a Matrix visual with a hierarchy in the column section. Place Type above Brand in the Columns field. Then add Country and State to the Rows section and use the Count of Car Name in the Values section. This setup mirrors Excel’s layout by grouping brands under their respective car types and shows the counts per combination, dynamically adapting to new data. To include a Total column at the far right, turn on Column Subtotals in the Matrix Format pane under Subtotals -> Per Column Level. This provides a subtotal for all brands under each type. This gives you the Excel-style total without needing to write a separate measure, and ensures it updates automatically as your data changes.
If you need a layout that exactly replicates Excel for reporting or export purposes, create a Table visual with manually defined DAX measures for each Type/Brand combination. Then create a Total column, Add Country, State and all these measures as columns in a Table visual.
If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.