I’m trying to create an Excel pivot table layout by the following in Power BI.
Customer Name
Business Unit
Sale Amount
by year with a variance at the end between the two years 2018 and 2019
I have provided an example of the layout in Excel and a PBIX. of a sample dataset with a Dax measure for the variance This year -TY vs. Last Year - LY.
To achieve this result firstly you’ll be required to turn off the “Word Wrap” option of the following menus -
Column Headers
Row Headers
Values
Now, once you turn off the “Word Wrap” option of the following menus. Now, just hide the columns that you don’t want to showcase in your reports, in this case, it’s the “Variance” columns. To hide the particular column just move your cursor at the headers in between the two columns and the cursor will get converted into the “Double - Sided Arrow” and than just drag it to the left-side to hide it. And by this way I’ve hidden all the “Variance” columns in the matrix visual.
Now, to have the Sub-Totals for “Sales” and “Variance” at a columnar level like you want. Just go to the “Sub-Totals” section/menu and turn on the option of “Column Sub-Totals” and than follow the same process. That is, showcase only the columns that you want for sub-totals and hide the remaining of them.
And below is the screenshot provided of the end result -