Forum Discussion

dsj8wksnnckk's avatar
dsj8wksnnckk
Resolver I
3 years ago
Solved

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

 

What I want to achieve is the following:

 

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!

6 Replies

    • dsj8wksnnckk's avatar
      dsj8wksnnckk
      Resolver I

      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?

      • rubayatyasmin's avatar
        rubayatyasmin
        Community Champion

        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: 

         

         

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