Forum Discussion
First Day of Semester
- 5 years ago
Anonymous solution attached, the core is to store semester start date in the calendar table and then use it to get semester start value. You can tweak the logic as per your need.
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- 5 years ago
Hi, Anonymous
I’m not sure the criteria for determining the range of semesters, what I think that the range of semesters is determined by a given table.
The following method is what I do for you.
If it’s not your expected output, please provide more details.
As below:
Step1: Create a calendar table as:
Calendar =
CALENDAR("2020-01-01","2020-12-31")
Step2: Create measure as:
FirstDay =
CALCULATE (
MAX ( Semesters[First Day] ),
FILTER (
ALL ( Semesters ),
'Semesters'[Last Day] = SELECTEDVALUE ( 'Calendar'[Date] )
)
)
Here is the output:
Here is the demo, please try it: First Day of Semester
Best Regards,
Link
Hi, Anonymous
I’m not sure the criteria for determining the range of semesters, what I think that the range of semesters is determined by a given table.
The following method is what I do for you.
If it’s not your expected output, please provide more details.
As below:
Step1: Create a calendar table as:
Calendar =
CALENDAR("2020-01-01","2020-12-31")
Step2: Create measure as:
FirstDay =
CALCULATE (
MAX ( Semesters[First Day] ),
FILTER (
ALL ( Semesters ),
'Semesters'[Last Day] = SELECTEDVALUE ( 'Calendar'[Date] )
)
)
Here is the output:
Here is the demo, please try it: First Day of Semester
Best Regards,
Link