Forum Discussion
Filtercontext with date relation
- 1 month ago
Hey, s_schultes ,
Your flag won't be filtered by department, and will send the result to every single department you have. This probably causes the overhelm of Direct Query.
Same also for customers that don't have a revenue or something:
You don't even need the flag. You can just build something like this, which will automatically not display anybody that doesn't have revenue or w/e you're after.
Neukunden Netto = CALCULATE( SUM(FactSales[geknetto]), USERELATIONSHIP( DimDate[Date], DimKunde[Anlagedatum] ) )
If you need to display customers by department, you can also do sometheing like this:Neukunde Flag Updated = CALCULATE( COUNTROWS(DimKunde), USERELATIONSHIP( DimDate[Date], DimKunde[Anlagedatum] ), TREATAS( VALUES(FactSales[KundeId]), DimKunde[Id]) )
Hey, s_schultes ,
Your flag won't be filtered by department, and will send the result to every single department you have. This probably causes the overhelm of Direct Query.
Same also for customers that don't have a revenue or something:
You don't even need the flag. You can just build something like this, which will automatically not display anybody that doesn't have revenue or w/e you're after.
Neukunden Netto =
CALCULATE(
SUM(FactSales[geknetto]),
USERELATIONSHIP(
DimDate[Date],
DimKunde[Anlagedatum]
)
)
If you need to display customers by department, you can also do sometheing like this:
Neukunde Flag Updated =
CALCULATE(
COUNTROWS(DimKunde),
USERELATIONSHIP(
DimDate[Date],
DimKunde[Anlagedatum]
),
TREATAS( VALUES(FactSales[KundeId]), DimKunde[Id])
)