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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
arieldossantos
Regular Visitor

Calculating Expected Values to be Found with multiplication between columns in different tables

Hello, community!

I`ve been facing an issue where I need to correlate 3 different tables and multiply a Count on the first table with the number of results expected.

Here`s the problem:

Table 1:

SERIALNO
XXX1
XXX2
XXX3


Table 2:

SERIALNOPRODUCTNOSIDE
XXX1YYY1A
XXX1YYY1B
XXX2YYY1A
XXX3YYY2A


Table 3:

PRODUCTNOSIDEQTTSIDES
YYY1A2
YYY1B2
YYY2A1
YYY3A2
YYY3B2


Table3[QTTSIDES] = CALCULATE(

    COUNTROWS('Table3'),
    ALLEXCEPT('Table3','Table3'[PRODUCTNO])
)

I need to calculate, with those tables, the expected quantity (count) of a serial on table 2 if it appeared on table 1.

In this example,  the result must be 5, because it expects that every serial from ProductNo 'YYY1' should appear 2 times on table 2 because of it's 2 sides, and every serial from ProductNo 'YYY2' should appear 1 time on table 2. So we can see that serial 'XXX2' is missing one side.

The point is calculating distinct Serials from table 1 * SideQtt from table 2 and comparing with the expected result, being able to view expected serials to be found on table 2 and the actually found.


2 REPLIES 2
v-weiyan1-msft
Community Support
Community Support

Hi @arieldossantos ,

 

As @lbendlin  replied, to allow us to better understand the problem and help you, can you share sample data and the results you are hoping for? Show it as a screenshot or excel. Or a sample pbix after removing sensitive data.

 

Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Can you reformulate your scenario in terms of "dimension"  and "fact"  tables?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.