The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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))
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |