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.
Hi So I have two tables As below :
Table 1
Role Foercast
1 15
1 23
2 11
1 13
Table 2
Role Delivered
1 10
1 12
2 10
2 1
My result should be a table where i sum up the Role values from each table and have difference between the forecast and Deliverd column
Role Difference(foercast-delieverd)
1 28
2 0
. I tried creating two tables by DAX to sum up Roles value and then merging them based on Role but when I try to do merge I dont see the tables I have created by DAX.
Please let me know how to achieve this. Thanks
Hi @Anonymous,
Please download my pbix file attached in previous post. It should work on you side as well.
Best Regards,
Qiuyun Yu
Hi @Anonymous,
You can create a measure below:
Difference = var del=CALCULATE(SUM(Table2[Delivered]),FILTER(ALLSELECTED(Table2),'Table2'[Role]=MAX(Table1[Role]))) var Fore=CALCULATE(SUM(Table1[Forecast]),FILTER(ALLSELECTED(Table1),'Table1'[Role]=MAX(Table1[Role]))) return fore -del
Best Regards,
Qiuyun Yu
So...what he said ^
But alternatively - do you want the unsummarized data for some reason? You could instead in the query, group each table by the role. Ignore the data, I'm just highlighting where the option is in the query editor.
Then link the two tables, and do your math via a simple related() and the substraction.
I did this but when I go to relate, only the initial available table is seen on the Query and hence I am unable to relate
Sorry, I'm not quite understanding.
So - here's an example file where I did my idea - if this isn't correct (likely) - where is my misunderstanding?
Thanks,
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 |
---|---|
68 | |
64 | |
51 | |
39 | |
26 |
User | Count |
---|---|
84 | |
57 | |
45 | |
44 | |
36 |