Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
21 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |