Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
I have a column in my table as below-
| group | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 6 to 10 | ||||||||||||||||||
| 11 to 20 | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 11 to 20 | ||||||||||||||||||
| 1111 | ||||||||||||||||||
| 3333 | ||||||||||||||||||
| 4444 | ||||||||||||||||||
| 555 | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 11 to 20 | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 6 to 10 | ||||||||||||||||||
| 11 to 20 | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 6 to 10 | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 11 to 20 | ||||||||||||||||||
| 1 to 5 | ||||||||||||||||||
| 6 to 10 | ||||||||||||||||||
| 11 to 20 | ||||||||||||||||||
| 1111 | ||||||||||||||||||
| 3333 | ||||||||||||||||||
| 4444 | ||||||||||||||||||
| 555
I need the output as in a table group by 1 to 5, 6 to 10 and 11 to 20 and not take any other numbers from the group, count of lines the group is appearing in the table and then the percentage of each group with respect to total group lines. the problem is whatever measure I create when I use the measure in table it is giving output as 100% for all 3 groups, it is not dividing by total lines. I need the output as-
|
Solved! Go to Solution.
Hello @learner03 Here's a possible solution to your query
This is a sample set
Now you can create a measure
i.e
Hello @learner03 Here's a possible solution to your query
This is a sample set
Now you can create a measure
i.e
Hi @learner03
In Power Query use this code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlQoyVcwVYrViVYyAzENDcBsQ7C4EZSDUIMqDgRghjEQgBkmQABmmJqa4tdKmrUoaigxkoCLYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Group = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Group", type text}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each Text.Contains([Group], "to")),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Group"}, {{"Count", each Table.RowCount(_), Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each [Count] / List.Sum(#"Grouped Rows"[Count]))
in
#"Added Custom"
Regards
Phil
Proud to be a Super User!
@PhilipTreacy i can't do in power query because the group is a calculated column based on some if conditions from other columns.
That would have been useful to know in the beginning! 🙂
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!