Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to create a measure that checks to see if there is an entry between a certain set of dates. The dates are the absolute max date of all entries created, and one year prior to that. The maximum entry date in my data is 12/9/2021, so it should be looking between 12/9/2020-12/9/2021, however it's not working properly. It is telling me that certain accounts have entries made when they are outside of those dates.
Here is my formula:
Hi @Anonymous
You could try this measure
a_Test Home Office =
VAR maxdate = CALCULATE ( MAX ( 'Usage Statistics'[CreateDate] ), ALL ( 'Usage Statistics' ) )
VAR startdate = EDATE ( maxdate, -12 )
RETURN
CALCULATE (
COUNT ( 'Usage Statistics'[ObjectType] ),
'Usage Statistics'[ObjectType] IN { "NB Exhibit Exhibit", "Main Exhibit Account" },
'Usage Statistics'[CreateDate] <= maxdate,
'Usage Statistics'[CreateDate] >= startdate,
'Usage Statistics'[Group] = "Home Office"
)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
var startdate = CALCULATE(max('Usage Statistics'[CreateDate]),ALL('Usage Statistics'),'Usage Statistics'[CreateDate])>=EDATE(maxdate,-12))
And then you can use a DATESBETWEEN filter.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
104 | |
77 | |
71 | |
51 |
User | Count |
---|---|
146 | |
107 | |
106 | |
89 | |
65 |