Forum Discussion
DAX Query using CROSSFILTER
Ah, you are using CROSSFILTER to modify the relationship direction. Was wondering where the CROSSFILTER piece came into play since I didn't see it in your original calculation. That's cool and all but then why not just make that relationship direction Both and not mess with it?
Again, this comes down to that this would be far easier if I could see what your source data looks like and then see what your expected result is
Here's a translated and scaled down version of the data model.
The Country table list 220 country. Each country has its unique code.
The CountryGroup table list economical region by country. Important to note that a single country can be in multiple CountryGroup. For example, Egypt can be in the CountryGroupName 'Africa' an also in CountryGroupName 'North Africa'
The DAX query should group Year, Month, CountryGroupName WHERE year=2019, CountryGroupCode=1 and sum the value.
The result would be:
2019 4 North America 2500
2019 8 North America 2500
2019 10 North America 10000
To my limited knowledge in DAX, I cannot make a relation from Data table CountryCode's field to CountryGroup table CountryCode's field because it will be a many to many relationship. That's why I'm using a bridge table (Country table).
I hope this clears things up a bit.
Thank's again!
JF.