Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

First Day of Semester

Hi

I need assistance from you.

 

I have the following table.

Thursday, October 1, 20201162.36
Friday, October 2, 20201165.01
Monday, October 5, 20201168.04
Tuesday, October 6, 20201168.93
Wednesday, October 7, 20201174.49
Thursday, October 8, 20201186.42
Friday, October 9, 20201190.01
Monday, October 12, 20201190.01
Tuesday, October 13, 20201170.72
Wednesday, October 14, 20201171.36
Thursday, October 15, 20201166.01
Friday, October 16, 20201171.80
Monday, October 19, 20201174.94
Tuesday, October 20, 20201187.39
Wednesday, October 21, 20201177.92
Thursday, October 22, 20201177.89
Friday, October 23, 20201175.33
Monday, October 26, 20201177.09
Tuesday, October 27, 20201162.58
Wednesday, October 28, 20201120.37
Thursday, October 29, 20201131.27
Friday, October 30, 20201136.75
Monday, November 2, 20201136.75
Tuesday, November 3, 20201151.37
Wednesday, November 4, 20201156.41
Thursday, November 5, 20201163.03
Friday, November 6, 20201172.34
Monday, November 9, 20201213.69
Tuesday, November 10, 20201213.39
Wednesday, November 11, 20201220.06
Thursday, November 12, 20201207.21
Friday, November 13, 20201209.87
Monday, November 16, 20201209.87
Tuesday, November 17, 20201230.73
Wednesday, November 18, 20201234.56
Thursday, November 19, 20201230.81
Friday, November 20, 20201239.74
Monday, November 23, 20201247.94
Tuesday, November 24, 20201270.61
Wednesday, November 25, 20201263.65
Thursday, November 26, 20201263.04
Friday, November 27, 20201261.74
Monday, November 30, 20201258.00
Tuesday, December 1, 20201285.12
Wednesday, December 2, 20201288.49
Thursday, December 3, 20201298.13
Friday, December 4, 20201341.23
Monday, December 7, 20201363.74
Tuesday, December 8, 20201363.74
Wednesday, December 9, 20201383.59
Thursday, December 10, 20201368.49
Friday, December 11, 20201377.67
Monday, December 14, 20201389.31
Tuesday, December 15, 20201408.02
Wednesday, December 16, 20201421.47
Thursday, December 17, 20201443.59
Friday, December 18, 20201426.47
Monday, December 21, 20201377.38
Tuesday, December 22, 20201400.91
Wednesday, December 23, 20201416.62
Thursday, December 24, 20201422.21
Friday, December 25, 20201422.21
Monday, December 28, 20201431.05
Tuesday, December 29, 20201450.72
Wednesday, December 30, 20201437.89
Thursday, December 31, 20201437.89
Friday, January 1, 20211437.89
Monday, January 4, 20211418.01

 

Unfortunately I can't show here all the table. But I have info since 2009. 

All I need is when I select the last day I receive the first day of the corresponding semester. For example If I select January 4th, I receive the value of January 1st, but If I choose October 20th, 2020 I receive the value of June 1st.

 

I appreciate your help.

 

2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

v-xulin-mstf
Community Support
Community Support

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:

v-xulin-mstf_0-1609999905132.png

 

Here is the demo, please try it: First Day of Semester

Best Regards,

Link

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous check attached

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

v-xulin-mstf
Community Support
Community Support

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:

v-xulin-mstf_0-1609999905132.png

 

Here is the demo, please try it: First Day of Semester

Best Regards,

Link

parry2k
Super User
Super User

@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.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

amitchandak
Super User
Super User

@Anonymous , The information you have provided is not making the problem clear to me. Can you please explain with an example?

The logic is not clear. Before this date what is the min date of continuous dates? or is there a semester value?

 

For example a new column can give you min date with the same semester 


Appreciate your Kudos.


Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
ToddChitt
Super User
Super User

Sounds like you need a Date dimension with an Attribute in it named "First Date of Semester". For Dates 1/1/2020 through 6/30/2020, this value will be Jan 1 2020. For July through December, it would be 7/1/2020. It's not much different than a Week Number or Week Start Date attribute.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.