Power bi data model

Soldato
Joined
22 Nov 2007
Posts
4,090
Hi All

I've been learning power bi for an upcoming job and i've made a simple(ish) football model but im a bit confused by the relationships

Here is my data model that i've just amended and now giving correct data for total goals scored by team and total goals scored by player - https://ibb.co/nLYfm3G

This is my how my model was before and it was giving incorrect data for the two counts mentioned above - https://ibb.co/RP2qgqF

I don't get how clubs>fixtures>goalscorers doesn't seem to give correct calculations/data. Shouldn't the clubs table be connected directly to the fixtures?
 
Last edited:
Associate
Joined
14 Mar 2007
Posts
1,657
Location
Winchester
I see what your doing and both should work. Your issue is the relationship between clubs and fixtures in your second model. You have both an active and in active relationship I assume between club id and away team I'd and home team Id in fixtures. There are ways to deal with that in dax using a special measure. But when you select the club as a dimension it will only filter on the active relationship. Now you could do something savvy with fixtures to deal with it. I.e. duplicate and append it to itself and only have a single relationship between club id and club id in fixtures. But techncially your model in the 1st image works so use that.
 
Back
Top Bottom