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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
supreethm19
Regular Visitor

Dax filtering using other table column that's not related because of the star schema limitation

Using the below data model, I want to create a measure RepRevenue based on the "RepProdMap" table & "Product" table.

 

- I will pull in the SalesRep & RepRevenue into a pivot table

- I need the RepRevenue to sum up for only the products that a SalesRep is assosciated in the "RepProdMap" Table

- Basically I need to figure out a way to pass the ProductId Column in the "RepProdMap" Table to "Product" Table

- If I create a join between Porduct & RepProdMap the data model will form the "Loops"

- If I create a inactive relationship and the use "USERELATIONSHIP" the data isn't filtering by salesrep, the data filters through Product only

 

 

moel.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can create a calculated column in Product table to take RepID to the Product table, with LOOKUPVALUE:

 

RepID = LOOKUPVALUE(RepProdMap[RepID], RepProdMap[ProdID], Product[ProdID])

And now you sum only the Revenue where you have a RepID with this measure:

 

Revenue Measure = CALCULATE(SUM(Orders[Revenue]), Product[RepID] <> BLANK())

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

You can create a calculated column in Product table to take RepID to the Product table, with LOOKUPVALUE:

 

RepID = LOOKUPVALUE(RepProdMap[RepID], RepProdMap[ProdID], Product[ProdID])

And now you sum only the Revenue where you have a RepID with this measure:

 

Revenue Measure = CALCULATE(SUM(Orders[Revenue]), Product[RepID] <> BLANK())
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @supreethm19

 

You may try to check the cross filter direction in the relationship or add filter in your measure. Here is the document for you.

https://www.sqlbi.com/articles/userelationship-in-calculated-columns/

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors