cancel
Showing results for
Did you mean:
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 hierarchy

Any help would be highly appreciated. TIA

2 ACCEPTED SOLUTIONS
Solution Sage

Hello you can add a calculated column

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

Helper III

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

5 REPLIES 5
New Member

Hi team

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

Any ideas how I can work around it? Thaaaaaanks

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

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

Hello you can add a calculated column

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

Helper III

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

Announcements

#### Join Arun Ulag at MPPC23

Get a sneak peek into this year's Power Platform Conference Keynote.

#### Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

#### Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

#### Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors
Top Kudoed Authors