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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How can I add conditional column based on month from date column?

Hi All,

 

I'm new to PowerBI and it is quite a basic query,

so I have date column and I need a conditional column with a specific output for specific months in the date column

example,

For months Jan, Feb, Mar, Apr   -   1st intake

                    may,jun,jul, Aug     - 2nd intake

                    sep, oct, nov, dec -   3rd intake

required output:

                     Date                          Intake

                  12-01-2019                   1st intake

                   13-06-2019                  2nd intake

                    01-11-2019                 3rd intake

 

tried different things but nothing worked, please help me out on this,any help is much appreciated. Thanks

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new column

 

Switch (True(),

month([Date]) <=4, "1st intake",

month([Date]) <=8, "2nd intake",

month([Date]) <=12, "3rd intake")

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try a new column

 

Switch (True(),

month([Date]) <=4, "1st intake",

month([Date]) <=8, "2nd intake",

month([Date]) <=12, "3rd intake")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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