Forum Discussion
Marek_Wojciech
2 years agoFrequent Visitor
Problem with correctly filtering a fact table based on another table
Hi, I'm taking my first steps in DAX and I have a simple model consisting of two tables. I created two measures (Generation and Generation1), the first returns the sum of generations, the second also...
parry2k
2 years agoSuper User
Marek_Wojciech try this:
Gen 1 Measure =
VAR __ComDate = MIN('tblUnits'[ComDate])
VAR __DeComDate = MIN('tblUnits'[DeComDate])
RETURN
SUMX(
FILTER (
'tblGeneration',
'tblGeneration'[Date] <= __DecComDate &&
'tblGeneration'[Date] >= __ComDate
),
'tblGeneration'[power]
)