Forum Discussion
Anonymous
2 years agoNot applicable
Last date not blank
Hello I have this table : Date Sales 20/05/2023 400 27/10/2023 500 and I have a slicer that I can slice the data by year/quarter/date My goal is when i select for example the first quarter...
Anonymous
2 years agoNot applicable
For this particular table I should receive data once every few months. That's why I want to spread the data and so I will see the last value that received even if I selected a month/quarter in which I did not received data.
AllisonKennedy
Community Champion
2 years agoAnonymous I don't use this function often, but it may work here: LASTNONBLANKVALUE - DAX Guide
You'll need to filter for date, so maybe something like this might work:
[LastValue] =
VAR _dateSlicer = MAX( dimDate[Date] )
RETURN
CALCULATE(
LASTNONBLANKVALUE ( dimDate[Date], factTable[Sales] ),
FILTER( ALL( dimDate ),
dimDate[Date] <= _dateSlicer
)
)