Forum Discussion
Thulasiram
2 years agoHelper II
To choose date
Dear all, I have the following table visual. the column "Bal minus credit" is created by a measure. I want the correspending date of the last negative value and would like to minus that date wit...
amitchandak
2 years agoSuper User
Thulasiram , Create a date table, join with date of you table
Last Negative Date =
CALCULATE(
MAXX(filter(Values('Date'[Date]),[Bal minus credit] < 0), [Date]), filter( all('Date'), 'Date'[Date] <= Max('Date'[Date])
))
Date Difference =
VAR FixedDate = DATE(2024, 3, 31)
VAR LastNegDate = [Last Negative Date]
RETURN
DATEDIFF(LastNegDate, FixedDate, DAY)
or
Value Difference =
VAR LastNegDate = [Last Negative Date]
RETURN
[Closing Balanace] - calculate ([Closing Balanace] , filter( all('Date'), 'Date'[Date] = [Last Negative Date]))