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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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