Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
Solved! Go to Solution.
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.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |