Forum Discussion
Running Cumulative Total Weekly
- 7 years ago
Hi,
This measure works. Download the file from here.
Measure1 = if(ISBLANK([Actual Time]),BLANK(),CALCULATE([Actual Time],DATESBETWEEN('Date 1'[Date],CALCULATE(MIN('Date 1'[Date]),ALL('Date 1'[asBUILT Weekday])),MAX('Date 1'[Date]))))
Hope this helps.
Sorry to keep bothering
Still unsolved...
I edit the 'Date1'[Weekdays] format to whole number under query then reload to Pivot
But the measure 1 still shows Error
Hi,
Share the link from where i can download your file with the coumn being a whole number.
- Ashish_Mathur7 years agoSuper User
Hi,
This measure works. Download the file from here.
Measure1 = if(ISBLANK([Actual Time]),BLANK(),CALCULATE([Actual Time],DATESBETWEEN('Date 1'[Date],CALCULATE(MIN('Date 1'[Date]),ALL('Date 1'[asBUILT Weekday])),MAX('Date 1'[Date]))))
Hope this helps.
- Anonymous7 years agoNot applicable
- Anonymous7 years agoNot applicable
Thanks very much, Ashish.
The function works fine. :cathappy:
- Ashish_Mathur7 years agoSuper User
You are welcome.
- Anonymous7 years agoNot applicable
Hi Ashish,
Just the last piece of function, I cannot figure out how it works (what is the logic)
CALCULATE(MIN('Date 1'[Date]),ALL('Date 1'[asBUILT Weekday]))
MIN('Date 1'[Date]),ALL('Date 1'[asBUILT Weekday])
This CALCULATE() is for the second value <start date> of DATESBETWEEN(<dates>,<start_date>,<end_date>), right?
This is the part I don’t understand. How this nested function work out cumulative time by week. Would you please explain a bit to help me understand?
How you make the cumulative time run by week?
Thanks
- Ashish_Mathur7 years agoSuper User
Hi,
CALCULATE(MIN('Date 1'[Date]),ALL('Date 1'[asBUILT Weekday])) will tell you the minimum date in every week when all weekdays of the Week are considered i.e. the first date of every week.