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.
Hi gurus,
I have to use group by for filtering Max values in my data set but there is a weird thing happening. I was wondering what
Group by
function is doing? Here is my dataset and the job I need to do:
Group by Ticket New column name: Operation: Column: Max Maximum Max
and the second situation when I have Qty as one of my column:
First I merged Ticket&Qty with comma seperator and then I used Group by: Ticket&Qty and Maximum by Max cloumn.
The final result is so different:
in the first situation I have 166 rows after grouping them and in second situation I have 205 rows!
My question is why there is such a big descripancy and what exactly is Group by function does?
Thanks
Solved! Go to Solution.
@Anonymous it is gong to return maximum value of unique value of group by columns
in 1st case, take unique ticket number and give the maximum qty
in 2nd case, take unique of ticket number & qty (concatenated file) and give the max qty and I expect more rows in 2nd case depending on data.
here is example
Ticket Qty
1 10
1 20
2 40
2 50
2 50
In first case, i will get two rows
Ticket Max Qty
1 20
2 50
in 2nd case I will get 4 rows
Ticket,Qty Max Qty
1,10 10
1,20 20
2,40 40
2,50 50
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous it is gong to return maximum value of unique value of group by columns
in 1st case, take unique ticket number and give the maximum qty
in 2nd case, take unique of ticket number & qty (concatenated file) and give the max qty and I expect more rows in 2nd case depending on data.
here is example
Ticket Qty
1 10
1 20
2 40
2 50
2 50
In first case, i will get two rows
Ticket Max Qty
1 20
2 50
in 2nd case I will get 4 rows
Ticket,Qty Max Qty
1,10 10
1,20 20
2,40 40
2,50 50
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |