Forum Discussion
GMichaud
5 years agoHelper I
Choose between segment dates and fixed dates based on condition
Hello community! It seems I can't come up with the right words for my question, so here is a new post for this. I need to be able to choose between using the minimum and maximum segment dates and u...
- 5 years ago
GMichaud , Based what I got
Measure =
var _1= DATEDIFF(MIN(dimCalendar(TheDate), MAX(dimCalendar(TheDate), DAY)
return
if(_1<30, 30, _1)When you need sum of avg
Measure =
var _1= DATEDIFF(MIN(dimCalendar(TheDate), MAX(dimCalendar(TheDate), DAY)
return
AverageX(values(Table[Segmenr]) , if(_1<30, 30, _1))
amitchandak
5 years agoSuper User
GMichaud , Based what I got
Measure =
var _1= DATEDIFF(MIN(dimCalendar(TheDate), MAX(dimCalendar(TheDate), DAY)
return
if(_1<30, 30, _1)
When you need sum of avg
Measure =
var _1= DATEDIFF(MIN(dimCalendar(TheDate), MAX(dimCalendar(TheDate), DAY)
return
AverageX(values(Table[Segmenr]) , if(_1<30, 30, _1))