Forum Discussion
YABOUSALEH
4 years agoFrequent Visitor
Prior Date with Data
Hello, I need to find the prior date with data as a measure, Two tables, 1 is a Calander table and 1 is a Lines table, Column Date comes from Calander, column Volume (Measure) comes from Lin...
- 4 years ago
Hi YABOUSALEH
please try
Prior Date with Volume = MAXX ( FILTER ( ALLSELECTED ( Lines ), [Volume] > 0 && 'Date'[Date] < MAX ( 'Date'[Date] ) ), 'Date'[Date] )
tamerj1
4 years agoCommunity Champion
Hi YABOUSALEH
please try
Prior Date with Volume =
MAXX (
FILTER (
ALLSELECTED ( Lines ),
[Volume] > 0
&& 'Date'[Date] < MAX ( 'Date'[Date] )
),
'Date'[Date]
)
- YABOUSALEH4 years agoFrequent Visitor
This is great, almost perfect, thank you, slightly modified, used the calander table instead,
Original:
Modified:
MAXX ( FILTER ( ALLSELECTED(Dates), [Volume] > 0 && Dates[Date] < MAX ( Dates[Date] ) ), Dates[Date] )This might be nitpicking, any chance dates outside the filters would populate?
Great if possible, can do without,
PS. I confirmed your response as an answer, would you just modify the code to Dates (or Calander) instead of Lines, for consistency to the next person 🙂
Cheers