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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. 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
Community Champion
Community Champion

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors