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 sales and so on
pls try this
Sales = SUM(technics[Value])
5 Replies
- AhmedxSuper User
pls try this
Sales = SUM(technics[Value]) - amitchandakSuper 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))- TOYER01Helper I