Power BI: define quarter based on months

Sometimes I have a month table to do a trend chart but I need also to define the quarter, so normally I have this table:

power bi quarter month

To define the quarter, I will add a new column:

power bi quarter month power bi quarter month

And put this formula:

FORMAT([Month],"\QTR YYYY-Q")

NOTE: “month” is the name of my column “month” so if you have a different name, just change it.

And I will get this result:

power bi quarter month

Next step, which is optional, I will change the name of the column by “Quarter”, in this case, in the formula, just modify “column” by “quarter”:

power bi quarter month

Interesting Management