Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a dataset for students with Course name, Start date, End date and current status fields. looking back over the last 5 years start dates I want to display if the student was or is still active at their 1,2 & 3 year marks.
I have a Measure which is very close to showing what I wanted (below), however when validating I realised its applying the current status retrospectively for older dates. i need it to show a student who started Jan 2020 and withdrew Feb 2021 as active at the one year actual but not in the two or three year milestones. the measure below doesnt count correctly in this example.
(I have three measures like this one below, changing the -1 value to match the year)
1 year active =
CALCULATE (
DISTINCTCOUNT ( registrations[StudentID] ),
DATEADD ( _DIM_Calendar[Date], -1, YEAR ),
OR (
registrations[status] = "Completed",
registrations[status] = "In Progress"
)
)
I can’t quite get my head around how to use the start and end date to calculate if a student was still active after 1 year, 2 years and 3 years - any guidance would be appreciated.
Solved! Go to Solution.
Replying if someone is searching for a similar problem.
I found a work around using power query - i created a count of years column between start and end dates and rounded down. Then i added in a filter to the above to include if the years qualified. not very elegant but gets the job done.
Dax measure Looks like this:
Replying if someone is searching for a similar problem.
I found a work around using power query - i created a count of years column between start and end dates and rounded down. Then i added in a filter to the above to include if the years qualified. not very elegant but gets the job done.
Dax measure Looks like this:
@Anonymous , Check if this blog on a similar topic can help
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |