Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello!
I made 2 manual dimension tables, named 'Company' and 'Teams'.
Also made a calculated table as shown below. With this table I'm able to merge 'Sales' and 'Costs' within the same table.
But, for 'Costs' I would like to a column as subdimension 'Teams'. Unfortunatly, can't make this work 🤦.
I would like to achieve this without using relationships between tables.
Hopefully this makes sense and somebody is able to help me out! Thanks a lot.
Facts =
UNION(
ADDCOLUMNS(
'Company';
"Type"; "Sales";
"Team"; "";
"TestMeasure"; ...
);
ADDCOLUMNS(
'Company';
"Type"; "Costs";
"Team"; "🤦";
"TestMeasure"; ...
))
Desired result:
| Company | Type | Team |
| A | Sales | |
| B | Sales | |
| A | Costs | 1 |
| B | Costs | 1 |
| A | Costs | 2 |
| B | Costs | 2 |
Solved! Go to Solution.
hi @Anonymous
You could use this formula as below:
Table =
UNION(
ADDCOLUMNS(
'Company',
"Team", "",
"Type", "Sales",
"TestMeasure", TODAY()
),
ADDCOLUMNS(
GENERATE('Company',FILTER(Team,Team[Team]<>3)),
"Type", "Costs",
"TestMeasure", NOW()
))
Result:
Regards,
Lin
hi @Anonymous
You could use this formula as below:
Table =
UNION(
ADDCOLUMNS(
'Company',
"Team", "",
"Type", "Sales",
"TestMeasure", TODAY()
),
ADDCOLUMNS(
GENERATE('Company',FILTER(Team,Team[Team]<>3)),
"Type", "Costs",
"TestMeasure", NOW()
))
Result:
Regards,
Lin
Thanks a lot!
The application of the generate function is what I was looking for.
You even filtered out team 3 from my example to get the desired result 😉
@Anonymous , It should work by giving column name like
Facts =
UNION(
selectCOLUMNS(Table1,"Company";
Table[Company];
"Type"; "Sales";
"Team"; "";
"TestMeasure"; ...
);
selectCOLUMNS(Table1,"Company";
Table[Company];
"Type"; "Costs";
"Team"; Table[Team];
"TestMeasure"; ...
))
@amitchandak thanks for your reply!
Maybe im missing something, but addcolumns expects an expression. Table[team] is not an expression.
I tried a lot of different expressions, but I'm not able to find the correct one.
The best one I found was RELATED('Team'[Team]). Unfortunatly this gave the result below.
| Company | Type | Team |
| A | Sales | |
| B | Sales | |
| A | Costs | 1 |
| B | Costs | 2 |
https://drive.google.com/open?id=1j9UOmy1cjbrjXREJSoY-_elkrwxj2ACX
If a relation between tables is necessary, feel free to suggest.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!