Forum Discussion
group by two columns from two tables
hi all,
how can i use GROUP BY when i want to group by two columns from two different tables?
For example i need one measure to group by colum1 and column2:
GROUP(Table1, Table1[Column1])
GROUP(Table2, Table2[Column2])
finally i want to count over these new table.
many thanks
3 Replies
- AnonymousNot applicable
HI powerbityro ,
Unfortunately, groupby function does not allow you to use multiple table columns, you can only use one table which defined in the function table parameter.
You can consider using SUMMARIZECOLUMNS function, it allows you to group records based on different table fields.
Regards,
Xiaoxin Sheng
- powerbityro
Helper II
hi thanks for the advice.
how can i use SUMMARIZECOLUMNS to count the number of records grouped by two columns?
- AnonymousNot applicable
HI powerbityro ,
Do your tables contain relationship mapping? If not, you can't get the correct calculation result based on multiple table column groups.
If you confused about coding formula, please share some sample data for test.
Regards,
Xiaoxin Sheng