Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
66 | |
54 | |
47 | |
36 | |
34 |
User | Count |
---|---|
84 | |
70 | |
58 | |
45 | |
44 |