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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Roy_W
Frequent Visitor

Filter the value from another table that cannot create relationship

Hi,

I want to create a bar chart to display IDs with their respective total hours.

Then I need to apply one filter value from another table that only exists indirect relationship between them.

I cannot create the relationship since there is no distinct value, please helps to check if any magic function can fulfill the requirment.

 

I have 4 tables format likes below:

Roy_W_0-1624501984995.png

The relationship between these tables:

Roy_W_0-1624504127996.png

 

I can create below result based on table "from_id history":

Roy_W_1-1624504200199.png

The disred result after applying status="Open" from table "to_id data":

Roy_W_2-1624504231967.png

 

Attached the working file, thanks.

working files 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Roy_W your original question was to show open and that's why. It is better to be specific. Anyhow, you can remove this open condition from the measure and then add a slicer and user can choose whatever they want

 

hours sum = 
CALCULATE ( 
    SUM ( 'from_id history'[hours] ), 
    CROSSFILTER ( 'from_id relationship'[from_id], 'from_id data'[from_id], Both )
)

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
niteshtrehan89
Helper III
Helper III

Please try teh below measure.

 

sum= calculate(SUM ( 'from_id history'[hours] ),

CROSSFILTER ( 'from_id relationship'[from_id], 'from_id data'[from_id], Both ),

    'to_id data'[status] in {"Open","Complete"})

 

 

parry2k
Super User
Super User

@Roy_W your original question was to show open and that's why. It is better to be specific. Anyhow, you can remove this open condition from the measure and then add a slicer and user can choose whatever they want

 

hours sum = 
CALCULATE ( 
    SUM ( 'from_id history'[hours] ), 
    CROSSFILTER ( 'from_id relationship'[from_id], 'from_id data'[from_id], Both )
)

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Roy_W here is the measure and use this in the visual:

 

hours sum = 
CALCULATE ( 
    SUM ( 'from_id history'[hours] ), 
    CROSSFILTER ( 'from_id relationship'[from_id], 'from_id data'[from_id], Both ), 
    'to_id data'[status] = "Open" 
) 

 

parry2k_0-1624508375679.png

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Roy_W
Frequent Visitor

@parry2k , thanks for the response.

This method can only filter the "Open" case, any idea that can let user choose "Open" or "Complete".

 

Thanks

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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