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
atowriss1
Advocate I
Advocate I

Calcuate next 3 months if an expected date column is 3 months past the selected date slicer

I have a table that has revenue, month-end date and expected revenue date.  I am looking to calculate the total revenue based on Expected revenue date.  So, If my slicer is 12/31/2022, I want expected revenue and store count for 30,60 and 90 days out.

 

My table has an active relationship between ME date and my date calendar, and an inactive relationship between expected revenue date and date calendar.  

 

The file is evergrowing, meaning, I will have a pipeline report that ends on 10/31/2022, 11/30/2022 and 12/31/2022, that is uploaded as 1 table.  

 

Here is what I am using currently: 

Store 60 days = calculate(totalMTD(SUM('EC Pipeline'[EV Rooftops]),'EC Pipeline'[ME Date]),
'EC Pipeline'[Expected Rev Date]=date(2023,2,28)).
 
I tried using the below- but it didn't work (it worked for 30 days, but not 60 or 90
Store 90 days = calculate(totalMTD(SUM('EC Pipeline'[EV Rooftops]),'EC Pipeline'[ME Date]),
USERELATIONSHIP('EC Pipeline'[Expected Rev Date],dimDate[Date]),

DATEADD(dimDate[Date].[Date],+3,MONTH)
)
 
essentially what I want is the MTD total (based on ME Date), IF the expected revenue date is 30,60 and 90 days after the selected date.
2 REPLIES 2
amitchandak
Super User
Super User

@atowriss1 , BAsed on what I got , you can have measure like

 

Rolling 30 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-30,DAY))

 

Rolling 60 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-60,DAY))

 

Rolling 90 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-90,DAY))

 

 

Rolling Days Formula: https://youtu.be/cJVj5nhkKBw

 

You can also consider window function

Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

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
amitchandak
Super User
Super User

@atowriss1 , BAsed on what I got , you can have measure like

 

Rolling 30 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-30,DAY))

 

Rolling 60 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-60,DAY))

 

Rolling 90 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-90,DAY))

 

 

Rolling Days Formula: https://youtu.be/cJVj5nhkKBw

 

You can also consider window function

Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

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

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.