Forum Discussion
AliceW
7 years agoPower Participant
Snapshot for a given date
Hi folks, This is such an important topic for me, so help a girl out, please. So, I have, say, 2 support cases, which have gone through different statuses in different dates. Case Sta...
- 7 years ago
you need separate Calendar table that would have all the dates
if you don't have one you can create it with this sytnax (adjust the dates properly)Calendar = CALENDAR(DATE(2018,1,1),date(2018,12,31))
this table it should have NO active joins to you data table
then this syntax should work (in the visual use date from Calendar table)Measure = VAR ShownDate = MAX('Calendar'[Date]) VAR RelevantRows = FILTER('Table','Table'[From]<=ShownDate+1 && 'Table'[Until]>=ShownDate) RETURN COUNTROWS(RelevantRows) - 7 years ago
so this is the sytnax I have with adjusted names:
Measure = VAR ShownDate = MAX('Calendar'[Date]) VAR RelevantRows = FILTER('Table','Table'[Change Date]<ShownDate+1 && 'Table'[Change Valid Until]>=ShownDate) RETURN COUNTROWS(RelevantRows)I cannot see what is working wrong here - can you specify which Enhancement Number has the data that shows the issue?
Stachu
7 years agoCommunity Champion
so this is the sytnax I have with adjusted names:
Measure =
VAR ShownDate = MAX('Calendar'[Date])
VAR RelevantRows = FILTER('Table','Table'[Change Date]<ShownDate+1 && 'Table'[Change Valid Until]>=ShownDate)
RETURN
COUNTROWS(RelevantRows)I cannot see what is working wrong here - can you specify which Enhancement Number has the data that shows the issue?
AliceW
7 years agoPower Participant
Now it's working - my bad, I must have changed something in your initial variable.
Thank YOU!!!!