Forum Discussion
JohanData
6 years agoResolver I
Cumulative Values between 2 Dates
I have a Dimension Table, Fact Table and Date Table. In the Dimension Table you have a ProjectNr, its Price, DateSigned and ProjectEndDate. In the Fact Table you see when you spend on this Pro...
Anonymous
6 years agoNot applicable
JohanData
If I get you right, you could use RELATED function to compare the dates in fact table with dates dimention table.
cumulative spending by project no.=
CALCULATE (
SUM ( 'Fact'[SpentAmount] ),
FILTER (
ALLEXCEPT ( 'Fact', 'Fact'[ProjectNr] ),
[Date] <= EARLIER ( 'Fact'[Date] )
),
'Fact'[Date] >= RELATED ( 'Dimension'[DateSigned] ),
'Fact'[Date] <= RELATED ( 'Dimension'[ProjectEndDate] )
)
Paul
Best
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JohanData
6 years agoResolver I
Anonymous Thanks for your support. I can't make your proposed measure right. This is the contextual situation. Could you please help me out?
with the following outcome:
I attached the files: