Forum Discussion
thx1137
Helper I
2 years agoCalculated Measure that compares a date from one table to a date from another joined table
All, I have a measure that is a distinct count of customers. We snapshot our data every month and we are always interested in knowing how many new customers we win each month and we track which ...
amitchandak
Super User
2 years agothx1137 , You can try like
This Qtr =
var _max1 = max(date[Date])
var _min = eomonth(_max1,-1* if( mod(Month(_max1),3) =0,3,mod(Month(_max1),3)))+1
var _max= eomonth(_min, 2)
return
calculate(sum(Table[Value]), filter(Date, Date[Date] = _max) )
or
This Qtr =
var _max1 = max(date[Date])
var _min = eomonth(_max1,-1* if( mod(Month(_max1),3) =0,3,mod(Month(_max1),3)))+1
var _max= eomonth(_min, 2)
return
calculate(sum(Table[Value]), filter(all(Date), Date[Date] = _max) )