Penguin
Penguin

Reputation: 21

Getting same aggregation value for all category

I have three table named Content, Reaction and ReactionTypes, the Content and ReactionTypes tables are connected to Reaction table using One to Many relationship. Now, Category and Score are the the column which I am using for my analysis in order to find top 5 categories and these table are belong to Content and ReactionTypes respectively.

When I dragging these two column in Table visual of Power BI, I am getting the same aggregation value (sum of Score) for all Categories. But when I used DAX calculation SUMX(Reactions, RELATED(ReactionTypes[Score])) and tried it worked.

At first, I created a table named "Popular Table" where added all the required column using RELATED function and it showed me desire output. I also try DAX calculation SUMX(Reactions, RELATED(ReactionTypes[Score])) and this also worked as I want. But I want to know the reason, why it was not showing me earlier when I dragging directly Score column to the visuals. What could be the reason?

Table Relationship Report Pane

Upvotes: 0

Views: 26

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12101

Ultimately you don't have a "direct" relationship between Content and ReactionTypes tables. Or the relationships you have are single direction, if you changed the relationship between Reactions and ReactionTypes to be "Both" direction then it will give you the results you are expecting.

Upvotes: 0

Related Questions