Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello!
In my previous post I asked how to prepare dataset for resource load.
For example, for every row of db_task table
I need to recieve this in another table:
The solution was to add a table on DAX:
clx_ResourcePlans =
SUMMARIZE(
filter(
CROSSJOIN(db_assignment, Local_DateTime),
Local_DateTime[Date]>=db_assignment[planned_start]
&& Local_DateTime[Date]<=db_assignment[planned_finish]
&& NOT(Local_DateTime[IsHolidayInRussia])
),
db_assignment[task_id], db_assignment[user_id], Local_DateTime[Date], "_plan", round(sum(db_assignment[DailyHours]), 2), "_fact", 0
)
Then, I made another table for facts:
clx_ResourceFacts =
SUMMARIZE(
FILTER(
CROSSJOIN(db_task, db_time_entry),
db_task[id]==db_time_entry[task_id]
&& db_time_entry[is_billable]="t")
,
db_time_entry[task_id], db_time_entry[user_id], db_time_entry[for_date], "_plan", 0, "_fact", round(sum(db_time_entry[hours]), 2)
)
In order to compare plans an facts, I append two tables:
clx_ResourceLoad = UNION(clx_ResourcePlans, clx_ResourceFacts)
Now the problem is that UNION expects, that I need two tables with the same structure. The same structure means the same number of columns. The matching is based on the position of the column in the table.
As you can see, I even add "_plan" column to clx_ResourceFacts table and "_fact" - to clx_ResourcePlans table.
But it did not help. My tables have different sequence of columns. An I get something like this
How can I solve this?
I read, that it is strongly recommended to have a look at Append and Merge transformations in Power Query instead of combining tables in DAX.
But I don't know how to merge tables in DAX using advanced condition, like
Local_DateTime[Date]>=db_assignment[planned_start]
&& Local_DateTime[Date]<=db_assignment[planned_finish]
Solved! Go to Solution.
@Anonymous If I am following this, use SELECTCOLUMNS to get your two tables to have the same order and names of columns prior to UNION.
@Anonymous If I am following this, use SELECTCOLUMNS to get your two tables to have the same order and names of columns prior to UNION.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
38 | |
31 | |
27 |
User | Count |
---|---|
91 | |
49 | |
44 | |
39 | |
35 |