Forum Discussion
damguy09
5 years agoFrequent Visitor
Grouping / Filtering from two dimensional tables
Thank you in advance for any help. I hope I can explain this well enough. I have a regular star schema model and I want to create a groups for: Strategic, Core, Opportunistic - that is based on...
mhough
5 years agoRegular Visitor
In a recent DAX training that I completed, I saw a relevant example. The function that you need is CROSSJOIN. The parameters of the function ask you for two tables, but you can use VALUES to get unique instances of each dimension. Something like this:
Crosstable = CROSSJOIN(
VALUES( Types[Channel Type]),
VALUES(Categories[Category] ) )
This would create a physical table, but you can use it within a measure as well to iterate over this temp table with SUMX
One word of caution, I've heard this function can cause performance issues in a large model and also that there is a function GENERATE that works in a similar fashion. That is worth looking into as well.