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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

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!

Proud to be a Super User!



View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Anonymous 

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
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

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!

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.