Forum Discussion
Last date not blank
Anonymous What's the rationale for why you want to see 400 even when the 20/5/2023 date is not included in the selected period? We need a specific rule that we can translate to Power BI in order for this to work.
- Anonymous2 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.
- AllisonKennedy2 years ago
Community Champion
Anonymous 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
)
)