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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
WishAskedSooner
Responsive Resident
Responsive Resident

Weighted Average Measure on Single Table with Multiple Filters

My apologies for being new to this forum. My first post of this problem was not specific enough. I have tried multiple times to reply with more information, but the forum never seems to let me. So, here is a second attempt with more information.

 

I have three tables:

Fact

WishAskedSooner_0-1715978396150.png

DimE joined on EID

WishAskedSooner_1-1715978423132.png

DimA joined on AID

WishAskedSooner_2-1715978492426.png

and the following Data Model

WishAskedSooner_3-1715978508921.png

 

I am trying to multiply Category A by Category B (not Category C) for each EID, then sum the individual results. I have created the following PIVOT to illlustrate:

WishAskedSooner_4-1715978583484.png

So, the actual operation looks like the following:

 

(5*15 + 10*20) = 275

 

I am trying to do this in a measure using DAX versus actually pivoting my data to a new table. All of the potential solutions I have found point to joining two columns from two different tables to multiply. As you can see, my data sits in one table. Therefore, I need to find a way to filter the table by Category A and Category B then multiply the filtered values by EID versus some other jumbled order.

 

I hope this makes sense.. Thanks in advance for the help.

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@WishAskedSooner,

 

Try this measure:

 

Weighted Average = 
SUMX (
    VALUES ( DimE[EID] ),
    PRODUCTX (
        CALCULATETABLE ( 'Fact', DimA[Category] IN { "A", "B" } ),
        'Fact'[VAL]
    )
)

 

DataInsights_0-1716302823908.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@WishAskedSooner,

 

Try this measure:

 

Weighted Average = 
SUMX (
    VALUES ( DimE[EID] ),
    PRODUCTX (
        CALCULATETABLE ( 'Fact', DimA[Category] IN { "A", "B" } ),
        'Fact'[VAL]
    )
)

 

DataInsights_0-1716302823908.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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