Forum Discussion
valivali
9 years agoRegular Visitor
Filter table by latest value in another table (DirectQuery)
So I have these two tables in DirectQuery mode: Table1 ID Date1 Table2 Date2 Value I need to make a sum of all the Values in Table2, for which the Date2 is after the...
Datatouille
9 years agoSolution Sage
Why don't you use a measure instead of a calculated column ?
Try this:
TotalSalesAfterDate1= VAR MxDate1 = Max(Table1[Date1]) RETURN Calculate(Sum(Table2[Value]) , Table2[Date2] > MxDate1)
Please note that you can allow unrestricted measures in DirectQuery mode if you go to File > Options and then Settings > Options and settings > DirectQuery.