Forum Discussion
DAX Crossjoin v Summarize
If I'm createing a virtual table for filtering, is there anything to choose between crossjoin and summarzie ?
example ; table 3 = fact table ;
EVALUATE
CROSSJOIN( ALL( Table4[Name]) , ALL( Table5[Items]))
EVALUATE
SUMMARIZE( Table3, Table4[Name],Table5[Items])
Both these work and produce same size table, I think in somme cases Summarzie would produce a smaller so better table,
but I understand crossjoin so tend to stick withi it .
Richard.
Hello Dicken ,
SUMMARIZE is smaller, more efficient, especially if many combinations are not present in the data.
Respects relationships.
CROSSJOIN produces all combinations of Name × Items, regardless of whether they exist in the fact table.
Ignores relationships.So CROSSJOIN can be slower for large dimensions and SUMMARIZE is more efficient in filtered scenarios.
If you want every possible Name × Item combo you can use CROSSJOIN, if ou want only combinations that actually exist in the fact table you can use SUMMARIZE.
If this solved your issue, please mark it as the accepted solution. ✅
2 Replies
- anilelmastasiSuper User
Hello Dicken ,
SUMMARIZE is smaller, more efficient, especially if many combinations are not present in the data.
Respects relationships.
CROSSJOIN produces all combinations of Name × Items, regardless of whether they exist in the fact table.
Ignores relationships.So CROSSJOIN can be slower for large dimensions and SUMMARIZE is more efficient in filtered scenarios.
If you want every possible Name × Item combo you can use CROSSJOIN, if ou want only combinations that actually exist in the fact table you can use SUMMARIZE.
If this solved your issue, please mark it as the accepted solution. ✅
- DickenPost Prodigy
Thanks, that's pretty much what I thought, it's just sometimes difficult to visualise summariize.