Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
What is the best approach to combining data from two tables (Actuals and Forecast in the example below), so both the Actual and Forecast field are available in the resulting table when some rows match and some don't.
Merging using a full outer join results in the following:
Would you then just create a new name field something like this:
Taking the value from Name if it's not null or from Forecasts.Name if Name is null.
Resulting in this:
Which can obviosuly then be tidied up:
Is there a better way of achieving the same thing?
Hi @seamie82 ,
The way I would approach this is to unpivot both the Actual and Forecast columns, append the two tables together and then rename 'Attribute' to Type.
That would give you this table:
Then in your measures you can use
CALCULATE ( [measure] , Table[Type] = "Actual" )
or
CALCULATE ( [measure] , Table[Type] = "Forecast" )
to use the two different sets of values.
@seamie82 , Power query append.
Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query
Or common tables https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...
Thanks, I read this already: https://radacad.com/append-vs-merge-in-power-bi-and-power-query
If you used append though would you do something like this?
Adding a descriptive column to each source and then appending:
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
87 | |
70 | |
66 |