Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I will greatly appreciate your input on the following -
I need to calculate the Sales Amount for the full quarter last year.
I am trying the following but the result is too high
Solved! Go to Solution.
@Anonymous , try measure like
Last year full qtr =
var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _max2 = date(Year(_max1) -1, month(_max1) , Day(_max1))
var _min = eomonth(_max2,-1* if( mod(Month(_max2),3) =0,3,mod(Month(_max2),3)))+1
var _max = eomonth(_min,2)
return
CALCULATE([net] ,Filter('Date','Date'[Date]>= _min && 'Date'[Date] <= _max))
or
Qtr =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1* if( mod(Month(_max),3) =0,3,mod(Month(_max),3)))+1
refer if needed
https://medium.com/chandakamit/cheat-sheet-power-bi-time-intelligence-formulas-using-today-654f26e27304
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
Thanks Amit.
Looks really neat!
I will try it out.
Thanks again!
@Anonymous , try measure like
Last year full qtr =
var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _max2 = date(Year(_max1) -1, month(_max1) , Day(_max1))
var _min = eomonth(_max2,-1* if( mod(Month(_max2),3) =0,3,mod(Month(_max2),3)))+1
var _max = eomonth(_min,2)
return
CALCULATE([net] ,Filter('Date','Date'[Date]>= _min && 'Date'[Date] <= _max))
or
Qtr =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1* if( mod(Month(_max),3) =0,3,mod(Month(_max),3)))+1
refer if needed
https://medium.com/chandakamit/cheat-sheet-power-bi-time-intelligence-formulas-using-today-654f26e27304
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |