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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Common Math problem: for calculating Fiscal Quarter Offset

I need help to use a M formula to calculate [Fiscal Qtr Offset], based on [Fiscal Mth].  Would really appreciate if you can help!

 

Fiscal yearFiscal MthFiscal Qtr Offset
F20191-5
 2-5
 3-5
 4-4
 5-4
 6-4
 7-3
 8-3
 9-3
 10-2
 11-2
 12-2
F20201-1
 2-1
 3-1
 40
 50
 60
 71
 81
 91
 102
 112
 122
F202113
 23
 33
 44
 54
 64
 75
 85
 95
 106
 116
 126
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the suggestion @v-frfei-msft 

I have a much larger date table generated using PQ, so I was hoping to look for a PQ solution.

 

I was able to solve the issue - hope this will help others in the future:

= Number.RoundDown(((Date.Year([Date]) - Date.Year(CurrentDate)) * 12 + Date.Month([Date]) - Date.Month(CurrentDate)) / 3, 0)​

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can achieve that by DAX.

offset = -6+CALCULATE(DISTINCTCOUNT('Table'[qtr]),FILTER(ALL('Table'),'Table'[Date]<=EARLIER('Table'[Date])))

Capture.PNG

 

Pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thanks for the suggestion @v-frfei-msft 

I have a much larger date table generated using PQ, so I was hoping to look for a PQ solution.

 

I was able to solve the issue - hope this will help others in the future:

= Number.RoundDown(((Date.Year([Date]) - Date.Year(CurrentDate)) * 12 + Date.Month([Date]) - Date.Month(CurrentDate)) / 3, 0)​
VasTg
Memorable Member
Memorable Member

@Anonymous 

 

Need little more explanation on how you are generating Fiscal Qtr Offset? The Current quarter will always be -1?

Connect on LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.