Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a couple tables. FactTable1 is connected to all dimensions and FactTable2 has some preagregated data and has only one realtion to FactTable1 (many) <-FactTable2(one) using CompositeId.
Tables structure:
| FactTable1 |
| PrimaryId |
| CompositeId |
| .... |
| Amount |
and
| FactTable2 |
| CompositeId |
| DifferentAmount |
I would like to use FactTable1 distinct CompositeId values and get a sum of FactTable2[DifferentAmount].
My current code that doesn't work:
//Code works, but return bigger result that expected
//probably, because the calculation has duplications and adds the same value
//from FactTable2[DifferentAmount] several times
SUMX (
FactTable1,
RELATED (FactTable2[DifferentAmount])
)
//This code should remove duplicates, but it doesn't work
SUMX (
DISTINCT (FactTable1[CompositeId]),
RELATED (FactTable2[DifferentAmount])
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 17 | |
| 9 | |
| 7 | |
| 6 |