Forum Discussion
cpcostaneves
4 years agoNew Member
Cross filter without resulting in SQL INNER JOIN
I'm connecting Power BI Desktop to an OLAP database (Clickhouse) using Direct Query. I have a typical case to show data from facts table filtering by dimensions table. I've been able to create a re...
amitchandak
4 years agoSuper User
cpcostaneves , if you simply join two tables and select some values in dimension table using slicer then it will filter ant measure of fact
Sum(facts_table[Value Number])
Now if you want to add a manual filter, tables are joined
calculate(Sum(facts_table[Value Number]), filter(dimensions_table, dimensions_table[Type] in {"ABC", "DEF"} ) )
you can have in like
measure =
var _tab = summarize(filter(dimensions_table, dimensions_table[Type] in {"ABC", "DEF"} ), dimensions_table[ID])
return
calculate(Sum(facts_table[Value Number]), filter(facts_table, facts_table[ID] in _tab) )