Forum Discussion
shday98
3 years agoRegular Visitor
Flagging Less Than Ideal Training Hours Accumulation
Good evening Microsoft Power BI Community! I'm stuck with a problem I'm hoping you can help with... I have a table that is a grouped sum of the training hours team members have accumulated throug...
Vijay_A_Verma
3 years agoMost Valuable Professional
Use following formula in a custom column where you would need to replace #"Changed Type" with your previous step name
[Hours Accumulated]>List.Last(#"Changed Type"[Hours Accumulated]
After this step filter out Ideal row.
A sample code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wck/NL0pPVdJRMjVSitWJVnIrSk0B8kwMwDzfxKLMxLw8kLyxKVjEMyU1MQekwEzPzFwpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, #"Hours Accumulated" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Hours Accumulated", type number}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [Name]="Ideal" then null else [Hours Accumulated]>List.Last(#"Changed Type"[Hours Accumulated])),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Name] <> "Ideal"))
in
#"Filtered Rows"