Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Dear Team
I need your support i would to as per data set below i would like to have the results belown: (you cans use: SUMX or...)
Raw data
Val |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
Solved! Go to Solution.
Group by val and add a sum aggregation
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlCK1YGRhhhsXCJwMhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Val = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Val", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Val"}, {{"val", each List.Sum([Val]), type nullable text}}),
#"Removed Other Columns" = Table.SelectColumns(#"Grouped Rows",{"val"})
in
#"Removed Other Columns"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the entire Source step with your own source.
please explain your question clearly
@FreemanZ , @Jihwan_Kim , @lbendlin, @Prasanthke , @shafiz_p ibendlin In my data set i have this colomn:
So i need to have the result below (table):
How can i do it?
Group by val and add a sum aggregation
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlCK1YGRhhhsXCJwMhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Val = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Val", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Val"}, {{"val", each List.Sum([Val]), type nullable text}}),
#"Removed Other Columns" = Table.SelectColumns(#"Grouped Rows",{"val"})
in
#"Removed Other Columns"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the entire Source step with your own source.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
8 |