Forum Discussion
TOYER01
3 years agoHelper I
SALES CALCULATION MTD
I have a source file having a column called "Sales" from January 2023 to December 2023. I want to display on the card, total sales for June, and when its july, it should switch to july total sal...
- 3 years ago
pls try this
Sales = SUM(technics[Value])
amitchandak
3 years agoSuper User
TOYER01 , Try like
MTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
or
MTD Today =
var _min = eomonth(today(),-1)+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
TOYER01
3 years agoHelper I