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.
Lets say that I have a table like this in M language:
A | B | C |
1 | 25 | X |
2 | 18 | Y |
1 | 20 | Z |
1 | 23 | W |
I want to group the rows by A and get the min of B from each group, but I also need the corresponding C value of the resulting B. This would be the resulting table in this case:
A | MinB | CorrespondingC |
1 | 20 | Z |
2 | 18 | Y |
As you can note, from the rows with value 1 in column A, 20 is the min value of B, and Z is the corresponding value of 20 in column C.
I have been looking for a while but I haven't found a solution for this in M language. I have to do find corresponding values for several aggregations so I want to know if there is any commun procedure, or some at least, to solve this.
Thanks in advance,
Solved! Go to Solution.
You may follow steps below:
1. Duplicate the table, then click Transform-> Group By to general table below:
2. Merge the two tables and remove some useless columns:
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You may follow steps below:
1. Duplicate the table, then click Transform-> Group By to general table below:
2. Merge the two tables and remove some useless columns:
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |