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
luzsoulez
Helper I
Helper I

rolling totals from secondary date

In my table I have 2 dates, start date which is related to the date table and end date which is not related to the date table

I made with no problems the rolling total for start date revenue, but I need to subtract the rolling total of the ends to get the net revenue for the period. I am having problems with the second part given that end date is not related to the date table.

 

Running actuals = var Maxdate= MAX(Date_Master[Date]) return CALCULATE([Sum Actuals],Date_Master[Date]<= Maxdate, ALL(Date_Master[Date]))- [Running actuals Ends]
Running actuals Ends = var Maxdate= MAX(Date_Master[Date]) return CALCULATE([Sum Actuals],'Consolidated Master'[Calc End Date]< Maxdate, ALL(Actuals[Calc End Date]))
3 REPLIES 3
luzsoulez
Helper I
Helper I

I use the standard DAX date table produced by RADACAD and the relations ship is 'Date Master'[date] to 'mydata'[Calc Start date]

ItemEmployee NameOfficial Start DateCalc Start dateEnd DateStatusDivisionDelivery CenterTotal StartsCalc End Date
ActualsRandom116-Jan-2316-Jan-23 ActiveDiv 1country 1116-Jan-24
ActualsRandom13-Apr-233-Apr-23 ActiveDiv 2country 211-Aug-23
ActualsRandom14-Aug-224-Aug-22 ActiveDiv 1country 3123-Apr-23
ActualsRandom17-Nov-227-Nov-22 ActiveDiv 2country 1131-Jul-23
ActualsRandom17-Feb-227-Feb-22 ActiveDiv 1country 2129-Dec-23
ActualsRandom127-Dec-2227-Dec-22 ActiveDiv 2country 3127-Dec-23
ActualsRandom116-Jan-2316-Jan-23 ActiveDiv 1country 1116-Jan-24
ActualsRandom116-Jan-2316-Jan-23 ActiveDiv 2country 2116-Jan-24
ActualsRandom14-Apr-234-Apr-23 ActiveDiv 1country 3130-Sep-23
ActualsRandom17-Sep-217-Sep-21 ActiveDiv 2country 112-Oct-23
ActualsRandom127-Dec-2227-Dec-22 ActiveDiv 1country 2127-Dec-23
ActualsRandom127-Dec-2227-Dec-22 ActiveDiv 2country 3127-Dec-23
ActualsRandom114-Nov-2214-Nov-22 ActiveDiv 1country 1131-Jul-23
ActualsRandom116-Jan-2316-Jan-23 ActiveDiv 2country 2116-Jan-24
Target  1-Dec-2331-Dec-23 Div 1country 341-Jan-24
Target  1-Nov-2331-Dec-23 Div 2country 141-Jan-24
Target  1-Oct-2331-Dec-23 Div 1country 241-Jan-24
Target  1-Sep-2331-Dec-23 Div 2country 341-Jan-24
Target  1-Aug-2331-Dec-23 Div 1country 131-Jan-24
Target  1-Jul-2331-Dec-23 Div 2country 221-Jan-24
Target  1-Jun-2331-Dec-23 Div 1country 321-Jan-24
Target  1-May-2331-Dec-23 Div 2country 111-Jan-24
Target  1-Apr-2331-Dec-23 Div 1country 211-Jan-24
Target  1-Dec-2331-Dec-23 Div 2country 341-Jan-24
Target  1-Nov-2331-Dec-23 Div 1country 141-Jan-24
Target  1-Oct-2331-Dec-23 Div 2country 241-Jan-24
Target  1-Sep-2331-Dec-23 Div 1country 341-Jan-24
Target  1-Aug-2331-Dec-23 Div 2country 131-Jan-24
Target  1-Jul-2331-Dec-23 Div 1country 221-Jan-24
Target  1-Jun-2331-Dec-23 Div 2country 321-Jan-24
Target  1-May-2331-Dec-23 Div 1country 111-Jan-24
eliasayyy
Super User
Super User

can you please provide sample data to better understand

do you have calendar table? and what is master date? and cant you copy the table instead of picture to insert it directly to powerbi ?

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!

November Carousel

Fabric Community Update - November 2024

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

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.