Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mybarbie9917
Frequent Visitor

Custom Adding Columns in a Matrix

A. Current Matrix "Sales of Food by Day of Week " 

- Rows: Food dimension 

- Columns: Date dimension  

- Values: [Sales] measure  

mybarbie9917_0-1624656507373.png

 

B. Wanted Result

- Same Rows and [Sales] measure .

- I can turn on the "Total" column by using Subtotal or Grand Total matrix settings.

- Question: I want to add extra "custom" subtotal columns ("Weekdays" and "Weekend" columns in blue background). What should I do to achive custom adding columns in a matrix? 

mybarbie9917_1-1624656607294.png

 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

By creating a 2nd day type, weekend/weekday, you can put both into the column part of the matrix and get this result. Will that work?

edhans_0-1624660519122.png

My fields are as follows:

edhans_1-1624660554859.png


See my PBIX file on how I did this. There is a full date table here and I added the Day Type column. If the day is SatSun, then Weekend, else Weekday.

NOTE: I just did this with the June 2021 Power BI desktop, so if you get an error when opening try and click through it, or upgrade.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

By creating a 2nd day type, weekend/weekday, you can put both into the column part of the matrix and get this result. Will that work?

edhans_0-1624660519122.png

My fields are as follows:

edhans_1-1624660554859.png


See my PBIX file on how I did this. There is a full date table here and I added the Day Type column. If the day is SatSun, then Weekend, else Weekday.

NOTE: I just did this with the June 2021 Power BI desktop, so if you get an error when opening try and click through it, or upgrade.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Thanks @edhans for your short workaround, it gives the expected sub-total columns. 

Great! Glad I was able to help @mybarbie9917 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.