Hi All,
I’m facing an issue with duplicate records when joining a Fact table to a Channel mapping table in Quick Sight.
Sample Data:
Fact Table (Fact_Sales):z
| B | C | D | E | F | G | H | I | |
|---|---|---|---|---|---|---|---|---|
| Business | Version | Year | Company | Channel | Brand | Group | Month | Value |
| Biz1 | V1 | 2025 | C1 | ChX | Br1 | G1 | Jan | 100 |
| Biz1 | V1 | 2025 | C1 | ChX | Br1 | G1 | Feb | 200 |
| Biz1 | V1 | 2025 | C1 | ChY | Br2 | G2 | Jan | 50 |
Channel Mapping (Channel_Map):
| B | C | |
|---|---|---|
| Channel Plan | Channel Group | Channel |
| PlanA | Retail | ChX |
| PlanB | Corporate | ChY |
| PlanB | Employee | ChY |
Brand Mapping (Brand_Map):
| B | C | D | |
|---|---|---|---|
| Brand | Series | Code | Description |
| Br1 | S1 | G1 | Product A |
| Br2 | S3 | G2 | Product B |
Problem:
Common Column Channel
When I join the Fact table with the Channel mapping on Channel, rows with ChY get duplicated because in the mapping table ChY belongs to both Corporate and Employee groups.
So instead of Value = 50, I end up with Value = 100.
Constraints:
-
I cannot make changes to the source files.
-
I can only work with Quick Sight dataset joins and calculated fields inside SPICE or Analysis.
What I’ve tried so far:
-
Created calculated fields to normalize keys (e.g. trim/upper) → joins work but still duplicate values.
-
Tried dividing values by a count of duplicates → works sometimes, but breaks in some groups.
-
Looked into filters at dataset level → but that removes some valid mappings.
Question:
What’s the best practice in Quick Sight to handle this kind of one-to-many mapping without changing the source files?
-
Should I solve this in the dataset join itself (if so, how)?
-
Or is there a recommended way with calculated fields to avoid double-counting?
Thanks
