Forum Discussion
Count Rows After a Date Specified on a Measure
- 5 years ago
Works fine on my side on the data you provided earlier. See it all at work in the attached file.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi theotejada
Are you sure [M_ReferenceDate] is of type datetime? Is the Sample[Date/Time] of type datetime?
Try this, and it should work with the rest as you have it:
M_ReferenceDate = CONVERT("12/14/2020 03:30:53 AM", DATETIME)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi AlB
I am sure that [M_ReferenceDate] is of type DATETIME. I had a prior calculation having the value of [M_ReferenceDate], which is:
M_ReferenceDate = CALCULATE(MAX('Another Table'[Date/Time]), FILTER('Another Table', 'Another Table'[Status] = "Started"))
Where Another Table has a sample value below: Note: I'm getting posting problems whenever I tried to insert a table, so I just made it manually below
Date/Time Status
08/15/2020 12:49:32 PM Started
08/15/2020 02:12:47 PM Ended
09/15/2020 06:59:06 PM Started
09/15/2020 08:36:09 PM Ended
11/11/2020 11:46:11 AM Started
11/11/2020 12:24:01 PM Ended
12/14/2020 03:30:53 AM Started
12/14/2020 05:05:25 AM Ended
The above calculation for [M_ReferenceDate] gets the highest value, in this case, 12/14/2020 03:30:53 AM and is formatted as DATETIME.