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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
RuthC
Frequent Visitor

Date Hierarchy

I am new at Power BI and want to visualize assessment data for a school. I need dates to appear in terms of School Year, not calendar year. I would like to be able to view scores by Fall (Aug) and Spring (May) and see trends over school years (2020-21, 2021-22, 2022-23, etc). What is the best way to set up a date table for this purpose?

1 ACCEPTED SOLUTION
AilleryO
Memorable Member
Memorable Member

Hi,

To help you start here is a formula in DAX, cretaing a table with CALENDARAUTO included into ADDCOLUMNS function to create other columns.

The structure is not too complicated so you should be able to add columns according to your needs.

Not sure about the system you want, my example takes month 8 (august) as the switch from School year 2022-2023 to 2023-2024.

Use this formula by creating a new table :

TableDateSchool = ADDCOLUMNS( CALENDARAUTO() ,

"Year", YEAR([Date]),

"Year-Month", FORMAT( [Date] , "yyyy-mm"),

"SchoolYear", IF( MONTH([Date])>8 , "SY"&YEAR( [Date] )&"-"&YEAR( [Date] ) +1 , "SY"&YEAR( [Date] )-1&"-"&YEAR( [Date] ) )

)
Let us if it works or tell us what's missing

View solution in original post

2 REPLIES 2
AilleryO
Memorable Member
Memorable Member

Hi,

To help you start here is a formula in DAX, cretaing a table with CALENDARAUTO included into ADDCOLUMNS function to create other columns.

The structure is not too complicated so you should be able to add columns according to your needs.

Not sure about the system you want, my example takes month 8 (august) as the switch from School year 2022-2023 to 2023-2024.

Use this formula by creating a new table :

TableDateSchool = ADDCOLUMNS( CALENDARAUTO() ,

"Year", YEAR([Date]),

"Year-Month", FORMAT( [Date] , "yyyy-mm"),

"SchoolYear", IF( MONTH([Date])>8 , "SY"&YEAR( [Date] )&"-"&YEAR( [Date] ) +1 , "SY"&YEAR( [Date] )-1&"-"&YEAR( [Date] ) )

)
Let us if it works or tell us what's missing

Yes, that worked. Thank you.

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.