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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

calculating financial year quarters

Hi All

 

I am getting a error in caculating Quarters like this

Can you help me identify

 
 
 
 
 
 
 
FY Qtr = SWITCH(TRUE(),
MONTH(financials[Date].[Month])=1,"Q4",
MONTH(financials[Date].[Month])=3,"Q4",
MONTH(financials[Date].[Month])=3,"Q4",
MONTH(financials[Date].[Month])=4,"Q1",
MONTH(financials[Date].[Month])=5,"Q1",
MONTH(financials[Date].[Month])=6,"Q1",
MONTH(financials[Date].[Month])=7,"Q2",
MONTH(financials[Date].[Month])=8,"Q2",
MONTH(financials[Date].[Month])=9,"Q2",
MONTH(financials[Date].[Month])=10,"Q3",
MONTH(financials[Date].[Month])=11,"Q3",
MONTH(financials[Date].[Month])=12,"Q3",BLANK() )
 
Error says "Cannot convert December to type text to type date"
 
 
 
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

You can create your Quarter Column as follows:

Quarter = 
VAR __M = MONTH ( financials[Date] )
RETURN

SWITCH(
    TRUE(),
    __M IN {1,2,3} , "Q4",
    __M IN {4,5,6} , "Q1",
    __M IN {7,8,9} , "Q2",
    __M IN {10,11,12} , "Q3"
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
v-cazheng-msft
Community Support
Community Support

Hi @Anonymous 

 

Noticed that you have resolved your issue by yourself, right? Could you please mark your solution by Accept as solution to help the other members find it more quickly. Thanks in advance!

 

Best Regards,

Community Support Team _ Caiyun

 

 

Fowmy
Super User
Super User

@Anonymous 

You can create your Quarter Column as follows:

Quarter = 
VAR __M = MONTH ( financials[Date] )
RETURN

SWITCH(
    TRUE(),
    __M IN {1,2,3} , "Q4",
    __M IN {4,5,6} , "Q1",
    __M IN {7,8,9} , "Q2",
    __M IN {10,11,12} , "Q3"
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

1431952_0-1635663325584.png

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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