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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JollyRoger01
Helper III
Helper III

How to use SUMPRODUCT (SUMX) in a calculated column for one related and one unrelated table? (Excel)

I have three tables and I can only relate two of them together due to circular references errors I get when trying to relate the other. I have tried to explain my goal as I've been writting this post but I think it is easier to simply show a desired output in a file.

 

I am looking for a formula to write in the Changes calculated column of Table 3 that gives me the desired output as shown in the worksheet. Please note this is a simplified version of my actual data and I can't change the relationship structure.

 

Book1 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@JollyRoger01 

Add the following calculated column: I attached the file below my signature.

Changes = 
SUMX(
    FILTER(
        Resource,
        Resource[System] = EARLIER(System[System] )
    ),
    Resource[Changes] * 
    MAXX(
        FILTER(
            'Weight',
            'Weight'[Resource] = Resource[Resource] 
        ),
        'Weight'[Weighting]
    )
)

Fowmy_0-1626756771367.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@JollyRoger01 

Add the following calculated column: I attached the file below my signature.

Changes = 
SUMX(
    FILTER(
        Resource,
        Resource[System] = EARLIER(System[System] )
    ),
    Resource[Changes] * 
    MAXX(
        FILTER(
            'Weight',
            'Weight'[Resource] = Resource[Resource] 
        ),
        'Weight'[Weighting]
    )
)

Fowmy_0-1626756771367.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Worked like a charm, thank you! Out of interest, is this a common occurance and common solution?

Jihwan_Kim
Super User
Super User

Picture1.png

 

Changes Measure : =
SUMX (
RELATEDTABLE ( Changes ),
Changes[Changes] * RELATED ( Resources[Weighting] )
)

 

https://www.dropbox.com/s/vyr52v7c4h9012r/jolly.pbix?dl=0 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank you, however as I pointed out I cannot use a relationship to the Resources table as you have outlined. My actual relationship tree is quite complicated and it doesn't allow for a relationship to that table, so I must call it another way.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors