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! Learn more
Hi,
i have a fact table which contains many repetitions of a Supply Number with different usage values by date. I have a dim table that contains same supply number and various prices. I want to create a measure that multiplies usage by RElated price.
I can set out a table that lists supply number from fact table and correctly lists the various price elements from theDim table.
however when I try to write a measure
cost = sum(fact[usage])* RELATED(dim[price] it doesn't work. I am advised that the related table can't be found.
any advice gratefully received
Denis
Solved! Go to Solution.
Hi @DJBrennan,
As the RELATED function needs a row context to work correctly, you should use SUMX function which return the sum of an expression evaluated for each row in a table in this scenario. The formula below is for your reference.![]()
cost = SUMX ( fact, fact[usage] * RELATED ( dim[price] ) )
Regards
Hi @DJBrennan,
As the RELATED function needs a row context to work correctly, you should use SUMX function which return the sum of an expression evaluated for each row in a table in this scenario. The formula below is for your reference.![]()
cost = SUMX ( fact, fact[usage] * RELATED ( dim[price] ) )
Regards
Hi I used the last answer first and that works (many thanks) but as I'm learning, I will try the alternative approach also and advise.
Again many thanks
Denis
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.