I have:
Name Value
A null
B null
null 5
null 10
and I need:
Name Value
A 5
B 10
Thanks a lot for providing a solution.
I had asked a similar question, to which @MarcelBeug provided a very helpful response; which, in turn, I'm using as the basis for my answer to you for your specific table.
This requires you to use Power Query (Power BI's query editor).
For your situation, I...
Here's the M code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Value", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Group", each "Group"),
#"Grouped Rows" = Table.Group(#"Added Custom", {"Group"}, {{"NameList", each List.RemoveNulls([Name]), type text}, {"ValueList", each List.RemoveNulls([Value]), type number}}),
#"Added Custom.1" = Table.AddColumn(#"Grouped Rows", "Tabled", each Table.FromColumns({[NameList],[ValueList]},{"Name","Value"})),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom.1",{"Tabled"}),
#"Expanded Tabled" = Table.ExpandTableColumn(#"Removed Other Columns", "Tabled", {"Name", "Value"}, {"Name", "Value"})
in
#"Expanded Tabled"