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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dax measurement of the previous day in matrix

Hello Community,

I've tried to figure out how to get my measure to show the previous day's sales for a specific customer.

I used this:

INV YDA - CALCULATE(SUM(Fact_Invoiced[TTL_EUR_AMOUNT]); PREVIOUSDAY(Dim_Calendar[Fecha]))
It works well when I'm using it on a table. There I can see that it is showing the correct results.
My problem occurs when I'm using the measurement in a matrix. Then, when I choose a specific month in a filter, the matrix will display the value of the 1st day of the selected month instead of the sales from the previous date of the month.
For example. Is there a way to get him to show 4/5 sales instead of 1/1 in the matrix? Maybe by adding some way a maximum date or something
1 ACCEPTED SOLUTION
Anonymous
Not applicable

hi @amitchandak ,

 

Thanks for the quick response!

 

I checked your solution and couldt not get it to work on my data.

 

Instead I ended up creating another matrix with an istoday filter to show only the changes since yesterday and still kept the monthly invoice overview matrix.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , this seems fine, should have worked. Try this option with your date table

example

Last Day Non Continous = CALCULATE(sum('order'[Qty]),filter(all(Table),Table[Date] =MAXX(FILTER(all(Table),Table[Date]<max(Table[Date])),Table[Date])))
Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd(Table[Date],-1,Day))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

hi @amitchandak ,

 

Thanks for the quick response!

 

I checked your solution and couldt not get it to work on my data.

 

Instead I ended up creating another matrix with an istoday filter to show only the changes since yesterday and still kept the monthly invoice overview matrix.

Hi @Anonymous ,

 

Please show us a sample data, such as Fact_Invoiced table and Dim_Calendar table.

 

Best regards,
Lionel Chen

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

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.