Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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

 

 

 

  • Anonymous , Try a new column

     

    Switch (True(),

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

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

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

1 Reply

  • Anonymous , Try a new column

     

    Switch (True(),

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

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

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