March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |