Forum Discussion
HelloTom
4 years agoMicrosoft Employee
SUM between two dates referencing Date table
Hello! First, a quick thank you to anyone able to help here, especially if this isn't your day job. What is in this linked folder? .pbix: sample data, model, and FACT/DIM relationships Excel...
- 4 years ago
HelloTom , In this case, do not join the date table with any date or keep the join inactive
try measure like
BatteriesAvailable =
var _max = MAXX(Allselected(DIM_Date), DIM_Date[Date])
return
SUMX(
FILTER(
FACT_Battery,
FACT_Battery[DateKey (Date_Built)] >=_max
&&
FACT_Battery[Date_EndOfLife(5days)] <= _max
)
,FACT_Battery[BatteriesBuilt]
)Also refer this, how to handle inactive joins
Anonymous
4 years agoNot applicable
Hi HelloTom
The field [BatteriesRecycled] is from FACT_Battery table , so can you provide the original data for the field [BatteriesRecycled] ?
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.