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
hitesh160790
Frequent Visitor

Modeling and Calculations

I have 3 tables

 

1) Product

Product IdName
1ABC

 

2) Components

Product IDR NameComponent Name
1RecipeIng A
1RecipeIng B

 

3) Future Plan

Product IdBuy
1500

 

Now we have

1 to many relationships for Product and Components 

and 1 to many relationships for Product and Future Plan

 

I am trying to create a calculation so that I can get

Product IdR NameBuy
1Recipe500

 

but I am getting the wrong results. Can anyone please help me out here.

2 ACCEPTED SOLUTIONS

@hitesh160790 ,

Create below relationship :

Component Table --> Future Plan (one to many based on ProductID with corss filter direction "Single")

Future Plan --> Product Table (One to one based on ProductID with cross filter direction "Both")

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

@hitesh160790 In your original post the relationship was good. Although @Tahreem24  solution would have worked given the sample data I  think you need to keep the same relationship in and use the measure to do the job.

 

I have put together sample data of 2 products and multiple recipes for one of the product and multiple buys and everything should work.

 

See attached, it contains many tables but just focus on Product/Receipt and Product Future table and a measure in the product table. You can tweak it from here.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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

8 REPLIES 8
Tahreem24
Super User
Super User

@hitesh160790 ,

Please refer the below Screen shot and try to implement this.

Capture.PNG1.PNG

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@hitesh160790 ,

Create below relationship :

Component Table --> Future Plan (one to many based on ProductID with corss filter direction "Single")

Future Plan --> Product Table (One to one based on ProductID with cross filter direction "Both")

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thanks a lot, it worked. Just a small change I did,

Component Table --> Future Plan (one to many based on ProductID with cross filter direction "BOTH") was used here instead of another table.

 

Thank you

Hi @Tahreem24  - thank you for your reply. The only issue with this model is that there is 'one to many' relationship between Future Plan and Product. The future plan is based on every month.

 

Like for Product 1, 

July 300

June 200

 

I want a total of 500 here which can be seen in the final table.

@hitesh160790 ,

Wait, you didn't mention about Month in Future plan table. Kindly share the proper details. Based on your input I have created sample at my side. Please check my relationship image and let me know the if I missed any column.

 

I would really appreaciate your KUDOS/THUMBS UP for support!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@hitesh160790 In your original post the relationship was good. Although @Tahreem24  solution would have worked given the sample data I  think you need to keep the same relationship in and use the measure to do the job.

 

I have put together sample data of 2 products and multiple recipes for one of the product and multiple buys and everything should work.

 

See attached, it contains many tables but just focus on Product/Receipt and Product Future table and a measure in the product table. You can tweak it from here.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.

@hitesh160790 one quick note here, you said, you create the relationship to both to make it work, which is fine but in general/as best practice, avoid using the relationship to both because, on larger/complex DAX expression, it can have performance implications and can also lead to some unexpected results because of cross filter direction to both. I have used the same both but in the measure so that it is only used when it is relevant.

 

Just sharing what is the best practice. It is not about solving a problem, it is how to follow best practice and make a scalable solution. Good luck!

 

 



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.

Thank you @parry2k for explaining this in detail.

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.