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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I am looking to get sum of quantity by using following dax.
Solved! Go to Solution.
@Anonymous , If no date is selected
or
2nd Last Month Today =
var _today =maxx( allselected('Reporting Dates') , 'Reporting Dates'[Date])
var _min = eomonth(_today,-3)+1
var _max = eomonth(_today,-2)
return CALCULATE([Qty], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
2nd Last Month Today =
var _min = eomonth(today(),-3)+1
var _max = eomonth(today(),-2)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
Last Month Today =
var _min = eomonth(today(),-2)+1
var _max = eomonth(today(),-1)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
@Anonymous ,
try this
Two month back sales =
CALCULATE (
[Qty],
FILTER (
'Dates',
MONTH ( 'Dates[Date] )
= MONTH ( MAX ( Reporting Dates] ) ) - 2
)
)
Thanks,
Arul
@Anonymous , If no date is selected
or
2nd Last Month Today =
var _today =maxx( allselected('Reporting Dates') , 'Reporting Dates'[Date])
var _min = eomonth(_today,-3)+1
var _max = eomonth(_today,-2)
return CALCULATE([Qty], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
2nd Last Month Today =
var _min = eomonth(today(),-3)+1
var _max = eomonth(today(),-2)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
Last Month Today =
var _min = eomonth(today(),-2)+1
var _max = eomonth(today(),-1)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))