Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I need 2 measures that use 1 of 2 measures in a fact table, the measure selected is to be based on the two joins with the dimension table.
The Fact table has 2 Product codes (Product 1 and Product 2) and 2 measures -Measure1 and Measure 2.
I have a Product dimension with a Product code.
Join 1 = Dim.Productcode = Fact.Productcode_1 (active relationship)
Join 2 = Dim.Productcode = Fact.Productcode_2 (inactive relationship).
My new measures
ProductMeasure1 needs to be to use join 1 and sum(Measure1)
ProductMeasure2 needs to be to use join 2 and sum(Measure2) .
ProductMeasure1 seems to work:-
ProductMeasure1 = SUMX(FILTER( 'FactTable'
, RELATED('DimTable'[Productcode])
= FactTable[Fact.Productcode_1]
)
,FactTable[Measure1])
ProductMeasure2 doess not work because of the USERELATIONSHIP, probably not place or construction:-
ProductMeasure1 = SUMX(FILTER( 'FactTable'
, RELATED('DimTable'[Productcode])
I need to use this relationship : USERELATIONSHIP('FactTable'[Productcode2],'DimTable'[Productcode])
= FactTable[Fact.Productcode_2]
)
,FactTable[Measure2])
Any ideas or other solutions ?
Thanks in advance
Solved! Go to Solution.
Thanks for your fast reply and solution. I will try them and share my findings
@KeenEye , it should be like
For join 1 , you need a measure like // Dim.Productcode = Fact.Productcode_1 (active relationship)
calculate(Sum(FactTable[Measure1]) )
for join 2
calculate(Sum(FactTable[Measure1]),USERELATIONSHIP('FactTable'[Productcode2],'DimTable'[Productcode]) )
refer
Thanks, it works and is much simpler than I thought.
Great support 👍 😃
Thanks for your fast reply and solution. I will try them and share my findings
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |