Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello All, Im trying to replicate a cumulative formula based on a look up date prior to be able to substract, just like the excel below. Any ideas?
Thanks in advance!!!
Solved! Go to Solution.
Thanks Cherie and all,
I have completed this via two things.
Created a metric to look up the previous week day value
Prev Work Day = CALCULATE(SUM('Dim DateCalendar'[Dim WorkDay.WorkingDay]),DATEADD('Dim DateCalendar'[Date],-1,DAY))
Created a Cumulative Sum formula
Running TSRGFM - IPD2T =
VAR MinDate =CALCULATE(MIN('Dim DateCalendar'[Date]), ALLSELECTED('Dim DateCalendar'))
VAR MaxDate =CALCULATE(MAX('Dim DateCalendar'[Date]), ALLSELECTED('Dim DateCalendar'))
VAR DateRange=FILTER(ALL('Dim DateCalendar'), 'Dim DateCalendar'[Date].[Date]>= MinDate && 'Dim DateCalendar'[Date].[Date] <=MaxDate)
RETURN
[TotSRGoal4Mnth & InspPerD2Tgt]-
SUMX(FILTER(
SUMMARIZE(DateRange,'Dim DateCalendar'[Date],
"Value", MonthViewInspectionDemand[Insp Per Day to target],
"TDATE", MIN('Dim DateCalendar'[Date]))
, [TDATE] <= MAX('Dim DateCalendar'[Date])
),
MonthViewInspectionDemand[Insp Per Day to target]*[Prev Work Day]
)
Hi @Joorge_C
You may try to create a column to get the values as requested. For example:
Column =
SUMX (
FILTER (
Table1,
Table1[Date]
<= EARLIER ( Table1[Date] ) - 1
&& RELATED ( 'Calendar'[Workday] ) = 1
),
Table1[Values]
)Regards,
Cherie
Thanks Cherie and all,
I have completed this via two things.
Created a metric to look up the previous week day value
Prev Work Day = CALCULATE(SUM('Dim DateCalendar'[Dim WorkDay.WorkingDay]),DATEADD('Dim DateCalendar'[Date],-1,DAY))
Created a Cumulative Sum formula
Running TSRGFM - IPD2T =
VAR MinDate =CALCULATE(MIN('Dim DateCalendar'[Date]), ALLSELECTED('Dim DateCalendar'))
VAR MaxDate =CALCULATE(MAX('Dim DateCalendar'[Date]), ALLSELECTED('Dim DateCalendar'))
VAR DateRange=FILTER(ALL('Dim DateCalendar'), 'Dim DateCalendar'[Date].[Date]>= MinDate && 'Dim DateCalendar'[Date].[Date] <=MaxDate)
RETURN
[TotSRGoal4Mnth & InspPerD2Tgt]-
SUMX(FILTER(
SUMMARIZE(DateRange,'Dim DateCalendar'[Date],
"Value", MonthViewInspectionDemand[Insp Per Day to target],
"TDATE", MIN('Dim DateCalendar'[Date]))
, [TDATE] <= MAX('Dim DateCalendar'[Date])
),
MonthViewInspectionDemand[Insp Per Day to target]*[Prev Work Day]
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 80 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |