cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Need help on this Formula

I been using PowerBI for awhile and I got stuck on this logic.

 

So basically i have two tables.

 

Table 1

ItemRequirement
A200
B150
V150
D200
G350
H69

 

Table 2

Qty
100
222
150
100
58
44

 

 

The goal is to sum Table 2 - which is 674 (sum of qty)

Then distribute those to Table 1 base on requirements from top to bottom.

 

so you see that item A got 200, Item B got 150 and so on, but on Item D it should only use 174 because the total QTY of table two is 674.

 

here's the desired outcome. the sum from answer column is 674 which should match the table 2 sum.

 

21312.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Need help on this Formula

Hi @pamboys09 ,

 

Check this file: Download PBIX 

 

If you consider it as a solution, please mark as a solution and kudos.

Ricardo


Did I answer your question? Mark my post as a solution!
Ricardo

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Need help on this Formula

Hi @pamboys09 ,

 

Check this file: Download PBIX 

 

If you consider it as a solution, please mark as a solution and kudos.

Ricardo


Did I answer your question? Mark my post as a solution!
Ricardo

View solution in original post

Highlighted
Super User II
Super User II

Re: Need help on this Formula

Hi @pamboys09 

How do you plan to rank values in your Table1? If it's alphabetic ranking, why V before D? If not - whats rule do define that A is first, B is second?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors