March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am trying to create a total based on values in another table which is not related to the table with my values.
Here are my tables. There are also dimension tables for things like gender, age, location, and platform. There is an association between TestDemos and ExperimentResults on the "ExperimentName" column. As a result, the "testDemos" table is not associated with any of the dimension tables.
There will never be more than 1 ExperimentName active on my dashboard in a given time. What I want to do is find the sum of "totalSales", filtering for platform and country in the "test demos" table. My issue is that the "total sales" table is not connected to the demo table or the experiment result table so I can not use the regular filters in the CALCULATE function. Any tips on how to resolve this?
Total sales | ||||
AgeKey | GenderKey | LocationKey | PlatformKey | totalsales |
20 | 0 | 1 | 1 | 5132 |
21 | 0 | 1 | 2 | 1115 |
Test demos | ||
ExperimentName | platform | country |
MyExperiment1 | iOS | United States |
MyExperiment2 | Android | Canada |
Experiment results | ||||
Experiment name | platformkey | genderkey | locationkey | agekey |
MyExperiment1 | 2 | 1 | 1 | 44 |
MyExperiment1 | 1 | 0 | 1 | 38 |
If the tables don't have a relationship and you can't find a way to relate them (even through other tables), how are you expecting to total them?
The "test demos" table is made of unique ExperimentNames. Since there should only be 1 Experiment active at a time, I was looking for a way to get a filter on the associated country/platform with that experiment. Not sure of the methodology; a max or top 1 would be part of my solution if this was SQL.
The issue is the lack of table relationship. I want to draw more attention to it as I feel that the hurdle you need to overcome. As you have mentioned only 1 experiement is active, but i am expecting there must something about that experiment that is unique enough that allows you to know how to relate it to the table contains the sales values? Should you look to create a composite key in both tables so you can relate both tables correctly?
From there you can rely on report context to ensure you are only summing active experiments.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |