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
AlexAlberga727
Resolver II
Resolver II

TOTAL REV SPLY + 90d Calculation

I'm looking for some assiatnce in the following - 

 

I want to be able to calculate what my revenue was for [ (Today's Date LY) TO (Todays Date LY + 90d) ].

   Example - If today was the first of the year, 01/01/2020. Then I want to know what my Rev. was for last year Q1 essentially. But                           this needs to be done dynamically for any date.

                            For today's calculation I would want the return to be total rev between 02/07/2019 - 05/08/2019.

 

Let me know if you have any thoughts, thanks!

 

 

 

I have failed with this below attempt - 

 

SPLY+90D Rev = CALCULATE( [Total Revenue],
DATESBETWEEN( dDateTable[Date],
DATEADD( dDateTable[Date], -1, YEAR ),
( DATEADD(dDateTable[Date], -1, YEAR) + 90 ) ))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

hi @AlexAlberga727 ,

 

please try the DAX formula to make MEASURE :

Rev Sply =
VAR Today_LY =
    TODAY () - 365
VAR LY_90 = Today_LY + 90
RETURN
    CALCULATE ( Sum_revenue, DATESBETWEEN ( 'Table'[date], Today_LY, LY_90 ) )

 

NOTE : make sure to change Date column to date type otherwise you will end up with the same issue you are facing.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.

 

Regards,

Gaurav Raj Singh

LinkedIN : https://www.linkedin.com/in/gauravrajsingh/

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

hi @AlexAlberga727 ,

 

please try the DAX formula to make MEASURE :

Rev Sply =
VAR Today_LY =
    TODAY () - 365
VAR LY_90 = Today_LY + 90
RETURN
    CALCULATE ( Sum_revenue, DATESBETWEEN ( 'Table'[date], Today_LY, LY_90 ) )

 

NOTE : make sure to change Date column to date type otherwise you will end up with the same issue you are facing.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.

 

Regards,

Gaurav Raj Singh

LinkedIN : https://www.linkedin.com/in/gauravrajsingh/

Thank you very much!

AlexAlberga727
Resolver II
Resolver II

Update - 

 

I have created a calculated column that would calculate last years date, and another for laster years date + 90.

 

SPLY_Example.png

 

"Updated Date" Will just signify the last day the data was updated. Update should occurr daily.

SPLY = Today's date - 1 Year

SPLY +90 = [SPLY]+90

 

SPLY + 90 Total Rev = 
CALCULATE( [Total Revenue], 
    DATESBETWEEN( dDateTable[Date], 
        'dInvVALUE (Keep Up-to-Date)'[SPLY], 
        'dInvVALUE (Keep Up-to-Date)'[SPLY + 90] )
)

 

However, still no success. Please let me know if you have any ideas.

 

Thanks again!

 

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.

Top Solution Authors