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
Kevin0001
Frequent Visitor

Creating Month Periods

I am working on a project in PowerBI and I want to create a Period Column in my Table. 
In this column there are supposed to be 3 categories: P4, P8 and P12 (the numbers correlate to the amount of months I want to take in the period).
P4 should be January till April,
P8 should be January till August and
P12 should be January till December

So far I have the following:

Period =
SWITCH(
    TRUE(),
    MONTH([Date]) <= 4, "P4",
    MONTH([Date]) <= 8, "P8",
    MONTH([Date]) <= 12, "P12",
    BLANK()

)

The problem with this, is that it does the following:
P4 is January till April, 
P8 is May till August and
P12 is September till December.

Does anyone know a sollution?

1 ACCEPTED SOLUTION
dharmendars007
Super User
Super User

Hello @Kevin0001 , 

 

Not sure if you are looking for same logic(P4,P8 and P12) in one single column which will be impossible because if the first condition like till Jan to Apr is P4 has met then how can  P12 with jan to Dec can appear in same column..

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

View solution in original post

1 REPLY 1
dharmendars007
Super User
Super User

Hello @Kevin0001 , 

 

Not sure if you are looking for same logic(P4,P8 and P12) in one single column which will be impossible because if the first condition like till Jan to Apr is P4 has met then how can  P12 with jan to Dec can appear in same column..

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.