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.
Hi,
Could someone help me with some advise with this, as you can see in the screenshot, left side, I have 3 columns, STYLE, COLOR and TOTAL UNITS SOLD, basically what I need is the way to get an output like the fig 2 show, notice that for Style A has 3 colors, I need to get from A only the high values, the same for STYLE B.
I did try grouping but when I use a MAX for COLOR Column then instand of show = A C1 200 then I am getting A C3 200, see that the COLOR is geeting the highest , because the max()
Fig 1 Fig 2
Solved! Go to Solution.
Hi @Rigolleto ,
How about this?
Before:
After:
Here the code in Power Query M that you can paste into the advanced editor (if you do not know, how to exactly do this, please check out this quick walkthrough)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZY67DYAwDER3cZ3CHyJqzBiR91+DJChgjuak96TzuTU6qNApPZSZoiQhKGpi7bGh+DR03nzZcMOwcYvJ/nxVQayGw1e+NncGISg08dg0BiF/QREX", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Style = _t, Color = _t, #"Total Units Sold" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Style", type text}, {"Color", type text}, {"Total Units Sold", Int64.Type}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"Style", "Color"}, {{"Total Units Sold", each List.Max([Total Units Sold]), type nullable number}}) in #"Grouped Rows"
Let me know, if this solves your query 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @Rigolleto ,
How about this?
Before:
After:
Here the code in Power Query M that you can paste into the advanced editor (if you do not know, how to exactly do this, please check out this quick walkthrough)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZY67DYAwDER3cZ3CHyJqzBiR91+DJChgjuak96TzuTU6qNApPZSZoiQhKGpi7bGh+DR03nzZcMOwcYvJ/nxVQayGw1e+NncGISg08dg0BiF/QREX", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Style = _t, Color = _t, #"Total Units Sold" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Style", type text}, {"Color", type text}, {"Total Units Sold", Int64.Type}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"Style", "Color"}, {{"Total Units Sold", each List.Max([Total Units Sold]), type nullable number}}) in #"Grouped Rows"
Let me know, if this solves your query 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
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 |
---|---|
10 | |
8 | |
7 | |
6 | |
6 |