Forum Discussion
Help with Cumulative DAX Measure with Filter
- 4 years ago
Thank you v-yanjiang-msft . I looked at the sample you created and it did the magic.
The Date table is connected to the fact table by a Datekey. Also, the 1803 and 1905 thing were typos.
Hi fuulhouse ,
According to your description, if you want to calculate the accumulated value of net cash flow, you can write it like this:
Cumulative Net Cash Flow =
SUMX (
FILTER (
ALLSELECTED( 'Table' ),
'Table'[Job Number] <= MAX ( 'Table'[Job Number] )
&& 'Table'[Start Year] = MAX ( 'Table'[Start Year] )
),
[Net cash flow]
)
Is the value of Cumulative Net Cash Flow your expected outcome?
I have some unclear points about your sample:
1.Is Date column in DimDate table a date type? How does it make relationship with the table of Start Year, as they are not the same data type.
2.The Last Transaction Year of 1803 and 1905 is 2021, why didn’t them return when you choose 2021 on slicer?
I cannot reproduce your problem in my sample, I attach my sample below, would you modify it and post again? It’s best to reflect your problem in the sample, so that I know where the problem is.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you v-yanjiang-msft . I looked at the sample you created and it did the magic.
The Date table is connected to the fact table by a Datekey. Also, the 1803 and 1905 thing were typos.