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
luisClive
Helper III
Helper III

Last Date -1

Hi Everyone

 

i have a formula which works well for me

 

Daily revenue =
CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),LASTDATE('Daily Net Revenue TRIAL'[Date]))
 
All i want is to calculate  now is Last Date -1 ............( that would be prior day)
 
Can you help?
I tried max -1 , did not work
1 ACCEPTED SOLUTION

Hi @luisClive ,

 

Would you please try to use the following measure:

 

 

Daily revenue =
CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),FILTER('Daily Net Revenue TRIAL','Daily Net Revenue TRIAL'[Date] = MAX('Daily Net Revenue TRIAL'[Date])-1)

 

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@luisClive , Try like

CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),LASTDATE('Daily Net Revenue TRIAL'[Date])-1)

i tried this earlier, did not work

Hi @luisClive ,

 

Would you please try to use the following measure:

 

 

Daily revenue =
CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),FILTER('Daily Net Revenue TRIAL','Daily Net Revenue TRIAL'[Date] = MAX('Daily Net Revenue TRIAL'[Date])-1)

 

 

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

 

Best Regards,

Dedmon Dai

 Many Many thanks

 

I was also able to achieve the same using

 

Daily Revenue = CALCULATE(SUM('Daily Net Revenue TRIAL'[Actual]),DATEADD(LASTDATE('Daily Net Revenue TRIAL'[Date]),-1,DAY))

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.