Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tom_Y
Advocate II
Advocate II

SUMX based on indirect/ inactive relationship

Hi all,

 

It must be very easy, but I just can't figure it out. Thanks in advance.

 

I want to make a measure to sumx the savings in table "All Project (Install), and show it in Maxtrix visual.

 

All Project (Install) is having all the Measure installed (e.g. APP, BANA, ORA)

Name Converter is a 2 columns table having the full name and short form (e.g. APP --> APPLE, BANA--> BANANA, etc).

"Carbon Saving" is having Annual (CO2) figures (e.g APPLE --> 2.5, BANANA --> 1.8)

 

The relationship between Name Converter and Carbon Saving is dotted line (inactive?). I have used the relationship for some other projects.

Can we make Measure if we don't have "Direct relationship" between "All Project" and "Carbon Saving"? 

Thank you very much.

 

Tom_Y_0-1701859583760.png

 

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

Assuming your tables are structured as follows:

  • "All Project (Install)" with a column named "Project"
  • "Name Converter" with columns "Short Form" and "Full Name"
  • "Carbon Saving" with columns "Full Name" and "Annual (CO2)"

Here's an example measure that sums the savings based on the indirect relationship:

 

TotalSavings =
SUMX(
'All Project (Install)',
LOOKUPVALUE(
'Carbon Saving'[Annual (CO2)],
'Name Converter'[Short Form],
'All Project (Install)'[Project]
)
)

 

This measure uses the SUMX function to iterate over each row in the "All Project (Install)" table. Inside the SUMX, the LOOKUPVALUE function is used to find the corresponding "Annual (CO2)" value from the "Carbon Saving" table based on the indirect relationship through the "Name Converter" table.

Make sure to replace 'All Project (Install)', 'Carbon Saving', 'Name Converter', 'Project', 'Short Form', and 'Annual (CO2)' with the actual names of your tables and columns.

Note: When working with inactive relationships, it's essential to consider the context in which the measure is used, as the inactive relationship might not be automatically traversed in all situations. If you encounter issues, you may need to use functions like USERELATIONSHIP or adjust the model relationships.

View solution in original post

1 REPLY 1
123abc
Community Champion
Community Champion

Assuming your tables are structured as follows:

  • "All Project (Install)" with a column named "Project"
  • "Name Converter" with columns "Short Form" and "Full Name"
  • "Carbon Saving" with columns "Full Name" and "Annual (CO2)"

Here's an example measure that sums the savings based on the indirect relationship:

 

TotalSavings =
SUMX(
'All Project (Install)',
LOOKUPVALUE(
'Carbon Saving'[Annual (CO2)],
'Name Converter'[Short Form],
'All Project (Install)'[Project]
)
)

 

This measure uses the SUMX function to iterate over each row in the "All Project (Install)" table. Inside the SUMX, the LOOKUPVALUE function is used to find the corresponding "Annual (CO2)" value from the "Carbon Saving" table based on the indirect relationship through the "Name Converter" table.

Make sure to replace 'All Project (Install)', 'Carbon Saving', 'Name Converter', 'Project', 'Short Form', and 'Annual (CO2)' with the actual names of your tables and columns.

Note: When working with inactive relationships, it's essential to consider the context in which the measure is used, as the inactive relationship might not be automatically traversed in all situations. If you encounter issues, you may need to use functions like USERELATIONSHIP or adjust the model relationships.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.