Forum Discussion
combinar consultas
- Anonymous5 years ago
rdiazd73
If you want to create report to include both tables values, you can create a many to one relationship for table 1=>table 2 using [codigo[ column, then you can put the column in one table visual and do calculation on table 2 using related(table1[column]).If you want to put 2 tables in 1 table, you can just use merge or append feature in query editor.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
And in PQ, if you have Table1, these would be the steps from table2:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Codigo = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Codigo", Int64.Type}}),
#"Merged Queries" = Table.NestedJoin(#"Changed Type", {"Codigo"}, Table1, {"codigo"}, "Table1", JoinKind.LeftOuter),
res = Table.AggregateTableColumn(#"Merged Queries", "Table1", {{"precio", List.Max, "Precio"}, {"marca", List.Max, "marca"}})
in
res
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers