Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Dear All,
I am trying to fetch the result of number of times batsman dismissed as per below table
| Batsman | Non-Striker | Batsman_Runs | Wicket_Type | Player_Dismissed |
| JE Root | BA Stokes | 1 | caught | JE Root |
| JE Root | BA Stokes | 2 | caught | JE Root |
| JE Root | BA Stokes | 4 | bowled | JE Root |
| BA Stokes | JE Root | 2 | run out | JE Root |
| HC Brook | JE Root | 1 | bowled | HC Brook |
| HC Brook | BA Stokes | 6 | run out | BA Stokes |
| HC Brook | OJ Pope | 3 | caught | HC Brook |
here the concentration should be on column "Player_Dismissed" and It should show the count of no. of dismissed should be as follows;
JE Root - 4
HC Brook - 2 times
BA Stokes - 1 time.
However I am getting a following result with the DAX formula used. so basically it is counting only column "Batsman" I knw it is faulty DAX formula. Could anyone please help me to rectify the DAX.
I am attaching the sample PBIX file.
https://drive.google.com/file/d/1uWqn2PR5WEQU2Dfz73AfG03KURkkmD_u/view?usp=drive_link
Regards,
Sandeep
Solved! Go to Solution.
@sdm2211 - Use the below:
Out =
VAR _name =
SELECTEDVALUE ( TEST[Batsman] )
RETURN
CALCULATE ( COUNTROWS ( TEST ), TEST[Player_Dismissed] = _name, ALL ( TEST ) )
See attached for results.
If this works, please accept as the solution to help others with the same challenge.
@sdm2211 - Use the below:
Out =
VAR _name =
SELECTEDVALUE ( TEST[Batsman] )
RETURN
CALCULATE ( COUNTROWS ( TEST ), TEST[Player_Dismissed] = _name, ALL ( TEST ) )
See attached for results.
If this works, please accept as the solution to help others with the same challenge.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 8 | |
| 8 |