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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
1001
Resolver II
Resolver II

Help Creating a Matirx Table with Different Date Period Columns

Hi, is it possible to create a matrix table with four date columns: sales yesterday, sales this week, sales this month, and year to date?

Thanks.

1 ACCEPTED SOLUTION

Hi @1001 
Yes again 🙂

If you need it dynamic 
First of all, you need the dim_date and mark it as a date table,see linked tutorial (and you will need some dates slicer) :

https://radacad.com/power-bi-date-or-calendar-table-best-method-dax-or-power-query

 

if it always according to "today"

ii all bottoms suggestions use TODAy() instead date column from the date table.

Last day sales :

PREVIOUSDAY = 
CALCULATE(SUM(Orders[Sales]), 
PREVIOUSDAY(Date_Table[Date]))

this week sales 
https://www.youtube.com/watch?v=kqr5iyd55Og

mtd / ytd 

https://www.mssqltips.com/sqlservertip/4841/calculating-mtd-qtd-ytd-running-and-cumulative-total-in-...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @1001, Yes, you need to create measures for all your periods and put them on "values".
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi Rita, thx. Would you know of any DAX examples I could reference to start building this out?

Hi @1001 
Yes again 🙂

If you need it dynamic 
First of all, you need the dim_date and mark it as a date table,see linked tutorial (and you will need some dates slicer) :

https://radacad.com/power-bi-date-or-calendar-table-best-method-dax-or-power-query

 

if it always according to "today"

ii all bottoms suggestions use TODAy() instead date column from the date table.

Last day sales :

PREVIOUSDAY = 
CALCULATE(SUM(Orders[Sales]), 
PREVIOUSDAY(Date_Table[Date]))

this week sales 
https://www.youtube.com/watch?v=kqr5iyd55Og

mtd / ytd 

https://www.mssqltips.com/sqlservertip/4841/calculating-mtd-qtd-ytd-running-and-cumulative-total-in-...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks Rita, will look over these today. Cheers.

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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