Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello world,
I have a huge issue of calculating an average based on two different columns.
I thought using this calc,
AVGof 2 cols =
AVERAGEX(
ADDCOLUMNS(
SUMMARIZE(
'<tablename>'
,'<tablename>'[Table 1]
,'<tablename>'[Table 2]
)
"ND1" , [Number of Days]
)
, [ND1]
)
but Table2 is in another tablename (let's name it table name 2). so I cannot use summarize, as it is taking only a single tablename.
I also tried allexcept, but yet it didn't work.
This is the data along with the result,any help would be appreciated.
| Tablename 1 | Tablename 2 | Tablename 1 | Result | |
| Name | Work | Days | ||
| VS | Book | 0 | 2 | |
| VS | Book | 1 | 2 | |
| VS | Book | 2 | 2 | |
| VS | Book | 3 | 2 | |
| VS | Book | 4 | 2 | |
| VS | Show | 0 | 0.5 | |
| VS | Show | 1 | 0.5 | |
| VS | Swim | 0 | 0.5 | |
| VS | Swim | 1 | 0.5 | |
| VI | Book | 0 | 4 | |
| VI | Book | 8 | 4 | |
| VI | Show | 0 | 2.66 | |
| VI | Show | 1 | 2.66 | |
| VI | Show | 7 | 2.66 | |
| VI | Swim | 0 | 0 | |
| TV | Book | 0 | 5.33 | |
| TV | Book | 1 | 5.33 | |
| TV | Book | 15 | 5.33 | |
| TV | Show | 0 | 0 |
Hi, @Anonymous
I wonder what 'Tablename 1' and 'Tablename 2' are like and the relationships between tables.
Best Regards
Allan
eventually these are 2 dim tables that are connected through a fact table.
how is the data related to each other from the two tables
Proud to be a Super User!
I guess (as I have no direct access to the model itself) that it is a many to many relationship using a bridge table.
Thanks @vanessafvg
does this old thread help at all?
https://community.powerbi.com/t5/Desktop/Combining-2-tables-and-Summarize/td-p/255606
Proud to be a Super User!
Well, as you can see on my sample calculation I tried to use summarize, but the command accepts columns from 1 table, and my 2 columns are in 2 different tables, so I don't think it helps somehow (or in a way that I can think of, pretty new in PBI)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 68 | |
| 45 | |
| 43 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 196 | |
| 126 | |
| 106 | |
| 78 | |
| 55 |