Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello friends,
I try to extract from the table the field of the greatest value, by field Id,
When I want to be filtered by field Bompname,
I would like to get the value in Ballance field
Example of a table "BALL"
id | compname | ballance |
1 | A | 26 |
1 | B | 15 |
2 | B | 9 |
2 | A | 15 |
3 | B | 5 |
3 | A | 3 |
In this example I would like to receive
A=3
B=5
Solved! Go to Solution.
You can do it like this:
=
SUMX (
VALUES ( BALL[compname] ),
VAR MxID =
CALCULATE (
MAX ( BALL[id] )
)
RETURN
CALCULATE (
MAX ( BALL[ballance] ),
BALL[id] = MxID
)
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
You can do it like this:
=
SUMX (
VALUES ( BALL[compname] ),
VAR MxID =
CALCULATE (
MAX ( BALL[id] )
)
RETURN
CALCULATE (
MAX ( BALL[ballance] ),
BALL[id] = MxID
)
)
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Work like a charm
Thank you
Hi @sagidam,
I expect there are several ways to do this...
This one seemed to work for me:
Column = SUMX( FILTER(BALL, [compname] = EARLIER([compname]) && [id] = MAXX(BALL, [id])), [ballance])
Results look like this (select "Don't summarize" for the visualization of the column):
sorry something dont work with the EARLIER syntax
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |