Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
SO im trying to Remove from my DDBB some ID if the left the company in the Quarter. But I cant Formulate a new column on Power Query.
This is the model I have:
Quarter | Left | ID |
1 | false | John |
1 | False | John |
1 | True | John |
1 | false | David |
1 | false | David |
1 | false | David |
2 | false | Phil |
2 | true | Phil |
So What i would Like is that For each ID that in the quarter have a Single True on the column left, its a column that returns for the whole quarter TRUE, Like this:
Quarter | Left | ID | New Column |
1 | false | John | True |
1 | False | John | True |
1 | True | John | True |
1 | false | David | False |
1 | false | David | False |
1 | false | David | False |
2 | false | Phil | True |
2 | true | Phil | True |
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUUpLzClOBdJe+Rl5SrE6EEE3bIIhRaUYYjDdLollmSkkixohiQZkZObABUsgVkHEYgE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Quarter = _t, Left = _t, ID = _t]),
#"Lowercased Text" = Table.TransformColumns(Source,{{"Left", Text.Lower, type text}}),
#"Grouped Rows" = Table.Group(#"Lowercased Text", {"ID"}, {{"ML", each List.Max([Left]), type text}, {"Rows", each _, type table [Quarter=nullable text, Left=text, ID=nullable text]}}),
#"Expanded Rows" = Table.ExpandTableColumn(#"Grouped Rows", "Rows", {"Quarter", "Left"}, {"Quarter", "Left"}),
#"Reordered Columns" = Table.ReorderColumns(#"Expanded Rows",{"ID", "Quarter", "Left", "ML"})
in
#"Reordered 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".
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 |
---|---|
16 | |
10 | |
10 | |
8 | |
7 |