Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Dear Team,
I am fetching highest score by batsman scored in an inning by below DAX measure.
Solved! Go to Solution.
Your current measure will work, you just need to add more data into the table, to uniquely identify the match and innings.
Set the 'Deliveries'[Innings] column to "do not summarize" and then include that and the match number, or some other column to uniquely identify the match, in the table visual. If you don't want to display them visually then you could either set the column width to 0 or use the visual calculation functionality to hide them.
Your current measure will work, you just need to add more data into the table, to uniquely identify the match and innings.
Set the 'Deliveries'[Innings] column to "do not summarize" and then include that and the match number, or some other column to uniquely identify the match, in the table visual. If you don't want to display them visually then you could either set the column width to 0 or use the visual calculation functionality to hide them.
Hi @sdm2211 ,
Did the replies above offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or if you have other problems, you can offer some information so that can provide more suggestion for you.
Best regards,
Lucy Chen
@sdm2211 I'm not entirely clear what results you are hoping to calculate, but I hope my answer helps!
If you're visual (table) has the batsman and inning fields, and your [M Highest Score] measure as columns, you just need to change the MAXX function to SUMX. You'll get something like this:
Alternatively, if you're looking to return batsman, innings, and scores all in one measure (not recommended) you can do this:
M All High Scores =
VAR Temp =
FILTER(
SUMMARIZE(
Deliveries
, Deliveries[Match_ID]
, Deliveries[Innings]
, Deliveries[Batsman]
, "run", SUM(Deliveries[Batsman_Runs])
),
[run] >= 100
)
RETURN
CONCATENATEX(
Temp
, Deliveries[Batsman] & " - Innings " & Deliveries[Innings] & ": " & [run]
, UNICHAR(10)
, Deliveries[Batsman] , ASC
, Deliveries[Innings], ASC
)
Results will look something like this:
I hope that's helpful!
hello @thefarside thanks for this code. However I am not looking for this kind of result.
I am looking for the result which is attached here https://drive.google.com/file/d/1GWrjEMoFenMjhdTqYcXCFhDM7EuTEhXG/view?usp=sharing
you can see KS Williamson is appeaing two times, one at 8th place with score 251 and another at 12th place with score 238. I want DAX will give me exact same result and should not return the result where only maximum score i.e. 251 will show. Currently I am using MAXX that is why showing only 251.
Could you please help me here.
https://drive.google.com/file/d/1MQp_V0FxjiW1VIyB6H7NCnC5rCzuAdaj/view?usp=sharing
https://drive.google.com/file/d/1GWrjEMoFenMjhdTqYcXCFhDM7EuTEhXG/view?usp=sharing
Is there any way to give the result of all records instead of MAXX.
Measures must return a scalar (a single value). You cannot return "all records".
what would be the expected outcome based on your sample data?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
13 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
12 | |
11 |