Forum Discussion
Anonymous
6 years agoNot applicable
Combining data from seperate queries
Hello! I am needing help with the combining data from two different queries into one table. I tried to creat a relationship between the two and that did not help. Basically, it is last month ...
- 6 years ago
Hi @Anonymous ,
We can try appending two tables as a new query after creating a custom column for them:
All inquiries are here:
Current dlq collection:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwUNJRMjIwMtA11DVFMA2VYnWilYwRssa65ggmUDYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [amount_collected = _t, date = _t, start_of_month = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"amount_collected", Int64.Type}, {"date", type date}, {"start_of_month", type date}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Category", each "CurrentMonth") in #"Added Custom"Last month DLQ Collecte:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjVQ0lEyMjAy0DXUtUQwDZVidaKVDI3hssa6pggmUDYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [amount_collected = _t, date = _t, start_of_month = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"amount_collected", Int64.Type}, {"date", type date}, {"start_of_month", type date}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Category", each "LastMonth") in #"Added Custom"Anexo1:
let Source = Table.Combine({#"Current DLQ Collecte", #"Last Month DLQ collected"}) in SourceIf it doesn't meet your requirement, could you show the exact expected result based on the tables we've shared?
Best regards
v-lid-msft
Community Support
6 years agoHi @Anonymous ,
We can try appending two tables as a new query after creating a custom column for them:
All inquiries are here:
Current dlq collection:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwUNJRMjIwMtA11DVFMA2VYnWilYwRssa65ggmUDYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [amount_collected = _t, date = _t, start_of_month = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"amount_collected", Int64.Type}, {"date", type date}, {"start_of_month", type date}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Category", each "CurrentMonth")
in
#"Added Custom"
Last month DLQ Collecte:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjVQ0lEyMjAy0DXUtUQwDZVidaKVDI3hssa6pggmUDYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [amount_collected = _t, date = _t, start_of_month = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"amount_collected", Int64.Type}, {"date", type date}, {"start_of_month", type date}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Category", each "LastMonth")
in
#"Added Custom"
Anexo1:
let
Source = Table.Combine({#"Current DLQ Collecte", #"Last Month DLQ collected"})
in
Source
If it doesn't meet your requirement, could you show the exact expected result based on the tables we've shared?
Best regards