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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
NP755
New Member

Extract quarterly data from custom fiscal year

hi Expert 

i am trying to extract the quraterly and fiscal data but my qtrly and fiscal data are showing as same. My fiscal year starts from nov-oct. 

 

dax for qtrly: 

Current Quarter Closed PIR Fraud Exposure = 
Var _gsi= CALCULATE([PIR EXPOSURE],'PIR-Case-POV'[Stage] ="Closed - No Further Action Required")
VAR _maxyear=MAX('Date'[Fiscal Year])
VAR _maxdate=MAX('PIR-Case-POV'[PIRReferralDate])
VAR _mxqtr=ROUNDUP(MONTH(_maxdate)/3,0) 
RETURN
CALCULATE(_gsi,'Date'[Fiscal Year]=_maxyear,'Date'[Fiscal Quarter]=_mxqtr)

in this code i am getting the fiscal year data instead of qtrly data. Is there any way to have this qtr dynamic like lets say if we want to have the previous qtr data. 

 

thank you again in advance

1 REPLY 1
amitchandak
Super User
Super User

@NP755 , try like

 

// Non standard - Start in Feb,May,Aug,Nov
QTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _mod = mod(Month(_max),3)
var _min = eomonth(_max,-1* Switch(True(), _mod =2, 1, _mod =1, 3,2))+1
return
CALCULATE([net] ,Filter('Date','Date'[Date]>= _min && 'Date'[Date] <= _max))

 

 

this can help

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

calendars

https://community.powerbi.com/t5/Community-Blog/Creating-Financial-Calendar-Decoding-Date-and-Calend...
https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5e...
https://amitchandak.medium.com/cheat-sheet-power-query-financial-year-calendar-5ceaacb520f1

DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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