Forum Discussion
Dax query
- 2 years ago
Hi amitgajkal2007
The first step is to transform the table to vertical to make the analysis easier.You can do it with the "unpivot" option of PQ
Then you will get the table as in the picture :
From here you can create 2 simple dax measures :
1. For matches :
matches = COUNTROWS('Table')2. For wins:wins = CALCULATE([matches],SELECTEDVALUE('Table'[Team])='Table'[winner])Result :pbix is attached, you can follow my steps at pq and dax.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi amitgajkal2007
The first step is to transform the table to vertical to make the analysis easier.
You can do it with the "unpivot" option of PQ
Then you will get the table as in the picture :
From here you can create 2 simple dax measures :
1. For matches :
pbix is attached, you can follow my steps at pq and dax.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- amitgajkal20072 years agoFrequent Visitor
Thats good one....i spent hours to figure it out using DAX. Prbolem with this is that it forms many to many relationship that is difficult to handle
Is there a solution using DAX? (Just Curious)- Ritaf19832 years agoSuper User
Hi amitgajkal2007
Happy to help 🙂 Why many to many,
it is just 1 table..
According to DAX, I see that @sanalytics gave a solution.- amitgajkal20072 years agoFrequent Visitor
Unpivoting creates a havoc on other reports. the slicers simply stop to work and doesnt filter.
hence i was asking for DAX approach. I have 4 tables, 20+ columns and 20k+ rows.
Thanks