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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
napsebi
Regular Visitor

Convert date to Quarter year

Hi, I'm trying to create a date table following the instruction that I found on https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi but I have an incorrect syntax error to create a Quarter column:

 

Quarter = IF('Date Table'[Month Number]<4,"Qtr 1",IF('Date Table'[Month Number]<7,"Qtr 2",IF('Date Table'[Month Number]<10,"Qtr 3","Qtr 4")))
 
Please, could you help me?
Thx
1 ACCEPTED SOLUTION

hi, @napsebi 

I have test it again, It still works well. there is error in it.

2.JPG

1.JPG

And If you could try these two formulae if they could work

Column = IF('Date Table'[Month Number] in {1,2,3},"Qtr 1", IF('Date Table'[Month Number] in {4,5,6},"Qtr 2", IF('Date Table'[Month Number] in {7,8,9},"Qtr 3","Qtr 4")))
Column 2 = IF('Date Table'[Month Number]<4,1,IF('Date Table'[Month Number]<7,2,IF('Date Table'[Month Number]<10,3,4)))

If still has the issue, please share your sample pbix file for us have a test

You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Lin

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hi, @napsebi 

I have tested the formula on my side, but not reproduce the issue.

If the 'Date Table'[Month Number] column is a numeric type?

14.JPG

 

If not your case, please share your sample pbix file, just with this table.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear @v-lili6-msft , many thx for your response, please find below screenshots.

 

 

DateTable02.PNG

 

DateTable01.PNG

 

hi, @napsebi 

I have test it again, It still works well. there is error in it.

2.JPG

1.JPG

And If you could try these two formulae if they could work

Column = IF('Date Table'[Month Number] in {1,2,3},"Qtr 1", IF('Date Table'[Month Number] in {4,5,6},"Qtr 2", IF('Date Table'[Month Number] in {7,8,9},"Qtr 3","Qtr 4")))
Column 2 = IF('Date Table'[Month Number]<4,1,IF('Date Table'[Month Number]<7,2,IF('Date Table'[Month Number]<10,3,4)))

If still has the issue, please share your sample pbix file for us have a test

You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Lin

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Many thx @v-lili6-msft , with this formula it works fine.

Best regards.

 

Column = IF('Date Table'[Month Number] in {1,2,3},"Qtr 1", IF('Date Table'[Month Number] in {4,5,6},"Qtr 2", IF('Date Table'[Month Number] in {7,8,9},"Qtr 3","Qtr 4")))

 

judspud
Solution Supplier
Solution Supplier

Hi @napsebi 

 

Please use the following column code:

 

Quarter = "Quarter " & ROUNDUP('Date Table'[Month Number]/3,0)

 

Please accept this solution if it provides what you require.

 

Thanks,

George

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors