This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi !
I have a problem with my dax measure which doesn't seem to be complicated ...
I have two tables : Match (with columns team_1_id and team_2_id) and Details (of the match) linked by match_id, and a slicer to select the team.
I would like to get the number of victories if the team is playing at home.
No problem to get the selected team with SELECTEDVALUE.
I have to use CALCULATE function with FILTER but I don't know how to check if the selected team is playing home.
I tried this but that doesn't work correcly :
Thanks in advance !
Solved! Go to Solution.
I finally found the solution which was simple.
I made the two relations inactive, and then I was able to access to the team_1_id and team_2_id like this:
I finally found the solution which was simple.
I made the two relations inactive, and then I was able to access to the team_1_id and team_2_id like this:
@sneem , try like
Win =
VAR Match_Team_Id_Home = ALLSELECTED('public match'[team_1_id])
RETURN
CALCULATE (
COUNTROWS ( 'details' ),
FILTER ( 'details', 'details'[team_1_final_score] > 'details'[team_2_final_score] && 'public match'[team_1_id] in Match_Team_Id_Home)
)
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
hi @amitchandak
Thank you for your help.
After investigation the relation between match.team_1_id and team.id was inactive (another relation was active instead).
This works after activation of the relation:
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 26 | |
| 25 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 22 | |
| 19 | |
| 18 |