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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dsj8wksnnckk
Resolver I
Resolver I

Complement values to a defined value

Hi all,

I'm trying to figure out how to solve the following challenge.

I have these two tables with data
Table1.jpgTable2.jpg

 

What I want to achieve is the following:

Table 3.jpg

 

Short explanation: I need my formula to check if the SUM of duration from Table1 is 60 (in this case) and if not, complement it with P4 and duration needed to achive the SUM of 60.

Please note that P4 can appear in Table 1 and that I need this output in table or matrix that can be sorted by Resources.

Thanks all for help!

1 ACCEPTED SOLUTION

Here you go

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

6 REPLIES 6
rubayatyasmin
Super User
Super User

Hi, @dsj8wksnnckk 

 

I have reproduced your problem and was able to solve it. 

Need to transform. I am adding the pbix file. 

AddP4 Rows.pbix

 

Result:

 
rubayatyasmin_6-1691600692964.png

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Hey,

thanks for the assistance.

I'm not quite sure this solution would be applicable. I see one of your steps is transpose table, but my table will have unlimited number of rows (thats what the 3 dots mean on the bottom).

What do you think?

Hey, If you check it again, those were the automated steps that PQ performed. I took a sheet not a table when importing data to PBI PQ. So those were the unnecessary steps. 

See below image: 

 

rubayatyasmin_0-1691659152731.png

 

these steps are the main ones. I did not use transpose. I loaded the tables and the result is same. 

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Hey, can you re-upload the file? It was deleted and I seem to have lost it 😞

Here you go

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


sure. I will upload it once I get home



Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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