Forum Discussion
Combining data from seperate queries
- 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
Anonymous
You can append the two tables: https://radacad.com/append-vs-merge-in-power-bi-and-power-query.
Create a common date dimension andTo get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/ use that for analysis.