Hi
I want to test in a Power Query if the Excel Table (t_AccrTrialBalance) is empty. If so then display a message and stop the Query otherwise do the transformation. how do I do this ?
Thank You
My code at present is
let
Source = Excel.CurrentWorkbook(){[Name="t_AccrTrialBalance"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type any}, {"Column3", type text}, {"Column4", type text}, {"Column5", type any}, {"Column6", type any}, {"Column7", type any}}),
#"Removed Top Rows" = Table.Skip(#"Changed Type",5),
#"Transposed Table" = Table.Transpose(#"Removed Top Rows"),
#"Cleaned Text" = Table.TransformColumns(#"Transposed Table",{{"Column1", Text.Clean, type text}}),
#"Transposed Table1" = Table.Transpose(#"Cleaned Text"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]),
in
#"Promoted Headers"
I want to test in a Power Query if the Excel Table (t_AccrTrialBalance) is empty. If so then display a message and stop the Query otherwise do the transformation. how do I do this ?
Thank You
My code at present is
let
Source = Excel.CurrentWorkbook(){[Name="t_AccrTrialBalance"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type any}, {"Column3", type text}, {"Column4", type text}, {"Column5", type any}, {"Column6", type any}, {"Column7", type any}}),
#"Removed Top Rows" = Table.Skip(#"Changed Type",5),
#"Transposed Table" = Table.Transpose(#"Removed Top Rows"),
#"Cleaned Text" = Table.TransformColumns(#"Transposed Table",{{"Column1", Text.Clean, type text}}),
#"Transposed Table1" = Table.Transpose(#"Cleaned Text"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]),
in
#"Promoted Headers"