Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I use the following measure to calculate a cumulative sum:
Cumul = CALCULATE ( SUM ('Query'[Indicator]), FILTER (ALL ('Query'[Date] ),'Query'[Date] <= MAX ( 'Query'[Date])) )
On this dataset:
Date | Persons | Indicator |
01/02/2017 | Mick | 1 |
01/03/2017 | Mick | 1 |
01/04/2017 | Mick | 1 |
01/02/2017 | David | 1 |
02/02/2017 | David | 1 |
03/02/2017 | David | 1 |
03/02/2017 | Mick | 1 |
It works properly when the date is a date. If I change date to Date Hiearchy the measure stops working.
Is this working as designed? If so, could someone please explain how the context works for me.
Best regards,
Mattias
Solved! Go to Solution.
Do you use Date table in your data model?
Hi,
no I do not use a date table. This is just a simple example I did to try and understand how dates/date hieararchy works.
Hi, I created and added a date dimension and now both work as intended. I still do not understand why the date dimension is required or why the date hierarchy breaks the DAX function but I will includ a date dimension in all the things I do now.
@Matjo wrote:Hi, I created and added a date dimension and now both work as intended. I still do not understand why the date dimension is required or why the date hierarchy breaks the DAX function but I will includ a date dimension in all the things I do now.
I've just stumbled across this thread and seeminly have an identical issue to the one you listed, choosing date hierarchy breaks my cumulative running totals.
Are you able to elaborate on your solution of adding a date dimension. Was that creating a new date table and then adding a relationship against your existing dates?
Thanks,
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |