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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Broly
Frequent Visitor

previous day on text

I have a table as follow :

Broly_0-1668470738519.png

Please keep in mind that I dont have a date column in the table but I use a date table.

 

I want to create a measure to get the previous day supply scheme.

 

When I use the "previousday()" function to get the previous day quantity, it works fine. 

I actually use this formula and it works fine as well : 

Qty previousday = CALCULATE(SUM(Table[quantity),FILTER ( ALL ( 'Date Table' ), 'Date Table'[Date] = MAX('Date Table'[Date]) - 1 ))
 
Problem is now I want to get the previous day supply scheme. Any easy way of doing this ?
 
Thanks for you help
5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You say that you do not have a Date column in your table but i clearly see a Date column there.  Please clarify.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

the date comes from another table that has a relationship with the first table. In the first table I have the date but as a number format. Let me know if you need more details

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Broly
Frequent Visitor

thank you for your response. I was looking to create a measure for that since I'm in a live connection model

FreemanZ
Super User
Super User

try this:

 

Supply scheme previousday = CALCULATETABLE(ALL('Table'[supply scheme]),FILTER ( ALL ( 'Date Table' ), 'Date Table'[Date] = MAX('Date Table'[Date]) - 1 ))

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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