cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

How to create Half Year in the date hierarchy

Hi Everyone, 

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

date.pngAdding Half year to date hierarchy

 

Any help would be highly appreciated. TIA 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Floriankx Established Member
Established Member

Re: How to create Half Year in the date hierarchy

Hello you can add a calculated column

 

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

Re: How to create Half Year in the date hierarchy

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

3 REPLIES 3
Floriankx Established Member
Established Member

Re: How to create Half Year in the date hierarchy

Hello you can add a calculated column

 

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

iamprajot Established Member
Established Member

Re: How to create Half Year in the date hierarchy

In Visual Level Filters select what months are required.

Re: How to create Half Year in the date hierarchy

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