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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vishnuprashanth
Helper III
Helper III

How to create Half Year in the date hierarchy

Hi Everyone, 

How can I add "Half Year" to the date hierarchy? 

Adding Half year to date hierarchyAdding Half year to date hierarchy

 

Any help would be highly appreciated. TIA 

2 ACCEPTED SOLUTIONS
Floriankx
Solution Sage
Solution Sage

Hello you can add a calculated column

 

=YEAR([Date])&" HY "&ROUNDUP(MONTH([Date])/6)

View solution in original post

Thanks, @Floriankx

I have added this custom column and also a custom date hierarchy adding this column to it. 

Just a small correction in your code, need to add 0 after the 6 for ROUNDUP.

Half Year=YEAR([Date])&" HY "&ROUNDUP(MONTH([Date])/6,0)


I create the hierarchy as shown in the solution of 
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-at-Hourly-Level/td-p/210538?lightbox-message....

Thanks again @Floriankx

View solution in original post

5 REPLIES 5
imtien2311
New Member

Hi team

 

I got an error for the operator "&" when I put the solution in my PowerQuery:

imtien2311_0-1676951302511.png

 

imtien2311_1-1676951327697.png

Any ideas how I can work around it? Thaaaaaanks

 

 

AnalystPower
Helper I
Helper I

Here is an alternative to the calculation meathod. @vishnuprashanth @iamprajot @Floriankx 

 

Right click on you Date column... even if it is the full date  and then select new group.

 

Then Bin it by 6 Months 

 
 
 

2020-06-12_11-30-22.jpg

iamprajot
Responsive Resident
Responsive Resident

In Visual Level Filters select what months are required.
Floriankx
Solution Sage
Solution Sage

Hello you can add a calculated column

 

=YEAR([Date])&" HY "&ROUNDUP(MONTH([Date])/6)

Thanks, @Floriankx

I have added this custom column and also a custom date hierarchy adding this column to it. 

Just a small correction in your code, need to add 0 after the 6 for ROUNDUP.

Half Year=YEAR([Date])&" HY "&ROUNDUP(MONTH([Date])/6,0)


I create the hierarchy as shown in the solution of 
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-at-Hourly-Level/td-p/210538?lightbox-message....

Thanks again @Floriankx

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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