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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
_GianmaBI46
Frequent Visitor

Data Modelling, filter propagation, use of bridge table?

I have a powerbi model with 4 tables, Agent, Partner, Agent_brand, Sale order. The table Agent and Partner contains unique values of agent_id and partner_id. I created the table Agent_brand which has duplicate values of partner_id because a partner_id can have multiple agent_id depending on the column brand_id and duplicate values of agent_id beacuse the same partner_id can have the same agent for the two brand_id. I have established a bi-directional relationship among agent_brands, Agent and Partner. Agent_brand being the many side in both cases. Then the table partner filter the sale order table to get sales data. When I put in a table the agent_id from agent, partner_id from partner and Net Sales which is simply Sum(Sale order[price]) I get wrong totals. Meaning that an agent has the two cells correspondig to the brands blank and the total incorrect.

_GianmaBI46_0-1727866707580.png

Total is incorrect and client 66545 should not be in the matrix under the agent_id 50406.

It is logic to me that withouth filtering for a specific brand the filter propagation do not understand to which agent assign the sales but how can I show the cumulative view? Right now the sales can be shown if there's a filter on brand. I need to have single values of agent_id and partner_id to be able to filter.

Thanks,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @_GianmaBI46 

 

Thank you very much Ritaf1983 for your prompt reply.

 

Pls try this:

 

"Agent"

vnuocmsft_0-1730363391607.png

 

"Partner"

vnuocmsft_1-1730363414560.png

 

"Agent_brand"

 

vnuocmsft_2-1730363448000.png

 

"Sale Order"

vnuocmsft_3-1730363460124.png

 

vnuocmsft_4-1730363483974.png

 

Create a measure.

 

Net Sales = SUMX(
    FILTER(
        'Sale Order', 
        'Sale Order'[agent_id] IN VALUES('Agent'[agent_id]) &&
        'Sale Order'[partner_id] IN VALUES('Partner'[partner_id])
    ),
    'Sale Order'[price]
)

 

Here is the result.

 

vnuocmsft_5-1730363531433.png

 

Regards,

Nono Chen

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

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @_GianmaBI46 

 

Thank you very much Ritaf1983 for your prompt reply.

 

Pls try this:

 

"Agent"

vnuocmsft_0-1730363391607.png

 

"Partner"

vnuocmsft_1-1730363414560.png

 

"Agent_brand"

 

vnuocmsft_2-1730363448000.png

 

"Sale Order"

vnuocmsft_3-1730363460124.png

 

vnuocmsft_4-1730363483974.png

 

Create a measure.

 

Net Sales = SUMX(
    FILTER(
        'Sale Order', 
        'Sale Order'[agent_id] IN VALUES('Agent'[agent_id]) &&
        'Sale Order'[partner_id] IN VALUES('Partner'[partner_id])
    ),
    'Sale Order'[price]
)

 

Here is the result.

 

vnuocmsft_5-1730363531433.png

 

Regards,

Nono Chen

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

 

Ritaf1983
Super User
Super User

Hi @_GianmaBI46 

Please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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.