Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
procyon82
Resolver I
Resolver I

Using RELATED()

Hi,

 

I only recently installed Power BI and I've been testing it for a few days. So far so good except that I am combining data from two different Google Analytics UA- tracking codes and I'm running into a problem. Here are my relationships, but I don't know if they are correct.

 

 

'Revenue per user per device' works (not correct though but just using as an example):

 

Revenue per user per device = RELATED(Ecommerce[Revenue]) / Traffic[Users]

 

How come 'revenue per user' which is Revenue per User = Ecommerce[Revenue] / RELATED(Traffic[Users]) does not work? It gives me the error: The column 'Traffic[Users]' either doesn't exist or doesn't have a relationship to any table available in the current context.

 

Since the data is coming from different GA accounts I can't simply include 'Users' in my 'Ecommerce' query. I feel like I need be changing my relationships somehow.

 

1 ACCEPTED SOLUTION
idanco
Advocate II
Advocate II

The relationship between ecommerce and Traffic is one -> many. 

Which means that for each row in ecommerce you can have more than one row in traffic.

Therefore, you must use RELATEDTABLE instead of related, And since this is going to return more than one row , You should wrap it in an aggregation function.

 

 

View solution in original post

3 REPLIES 3
idanco
Advocate II
Advocate II

The relationship between ecommerce and Traffic is one -> many. 

Which means that for each row in ecommerce you can have more than one row in traffic.

Therefore, you must use RELATEDTABLE instead of related, And since this is going to return more than one row , You should wrap it in an aggregation function.

 

 

Thanks! That's helpful. Can you elaborate on the aggregate function? I looked it up and none (https://msdn.microsoft.com/en-CA/library/ms173454.aspx) work for my purposes.

You linked to a T-SQL page. Try the DAX reference instead: https://msdn.microsoft.com/en-us/ee634396.aspx

 

Sum/SumX, etc. are aggregation functions.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors