Forum Discussion
joshuavd
10 years agoFrequent Visitor
DAX Counting across two tables with multiple columns
I have two tables representing our foosball games played in office. The first is what is generated by our software that has these columns: A game can either be a single or doubles I ...
Greg_Deckler
Community Champion
10 years agoType = //First get the number of players by counting the related rows in the Foosey table Var Players = CALCULATE(COUNTROWS(Foosey),RELATEDTABLE(Games)) RETURN IF(Players = 2,"Singles","Doubles")
This assumes a relationship between Foosey and Games tables based upon Game columns.
- Sean10 years ago
Community Champion
- joshuavd10 years agoFrequent Visitor
Thanks! I had tried this previously but it wasn't working, on further investigation I realized that I had not created a relationship between the tables... rookie mistake! Really appreciate it!
- Greg_Deckler10 years ago
Community Champion
joshuavd - Glad you got it resolved, that's why I always try to call out assumed relationships when posting answers!