Forum Discussion

Switto's avatar
Switto
Helper IV
6 years ago
Solved

if condition between two tables

Hello Everyone,

 

I am working on Time and Motion data which requires excluding the line items which are not aligned to Project TAT.

 

So I have a table which has data for day to day line items which were completed by the team members in the process with Start and End time and duration to complete(in seconds)

 

I have another table which consists of the Process name, size of work, and Min and Max seconds to complete the particular process.

 

Please see the below table for more understanding:

 

  Table A   Table B 
Action nameSIZETime taken to process(Sec.) Action nameSIZEMin SecMax Sec
ABC Process0-200480 ABC Process0-200250750
GF Process0-2002323 ABC Process>2007502200
UI Process>2003434 GF Process0-200250750
HGF Process>2001290 GF Process>2007502200
ABC Process0-200576 UI Process0-200250750
GF Process0-200243 UI Process>2007502200
ABC Process>2002353 HGF Process0-200250750
UI Process0-200354 HGF Process>2007502200
ABC Process>2001980     

 

As we have duplicates in both the tables, I have created a bridge table and connected both the tables.

 

For example, ABC process as 4 lines of work in table A and if compare the process and size with Table B, line # 7 (highlighted in red)does not qualify and excluded from the analysis and replace with Blank.

 

Please give me some advice, on how to achieve this.

 

Thanks

  • Switto - You will want to use RELATED or RELATEDTABLE or possibly LOOKUPVALUE and could also use MAXX(FILTER(...)...)

6 Replies

    • Switto's avatar
      Switto
      Helper IV
      Thanks Ankit for the note, however it has confidential data hence unable to share it. Appreciate you quick reply. Thanks
      • Anonymous's avatar
        Anonymous
        Not applicable

        Switto 

        For such multiple tables senario, you can create a short sample with random data to describe your model, you are unlikely to get an expected solution without a sample pbix.

         

        Regards
        Paul

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Switto - You will want to use RELATED or RELATEDTABLE or possibly LOOKUPVALUE and could also use MAXX(FILTER(...)...)

    • Switto's avatar
      Switto
      Helper IV

      Thanks for the tips 🙂 Let me read up and try to put into solution.

      Appreciate your quick reply.

    • Switto's avatar
      Switto
      Helper IV

      Greg_Deckler : Thanks for the tip. I have used the "lookupvalue" to get the data from my AHT file to Rawfile.

       

      It worked for taking the minimum time however, while using it for Maximum time, got the error "A circular dependency was detected: RawFile[mMax_Time], RawFile[mMini_Time], RawFile[mMax_Time]."

       

      I have used formula for mini. as 

      LOOKUPVALUE(AHT[mMin_AHT_Sec],AHT[Process Name],RawFile[Action name],AHT[Size],RawFile[mTree_size])
      and, Max is 
      LOOKUPVALUE(AHT[mMax_AHT_Sec],AHT[Process Name],RawFile[Action name],AHT[Size],RawFile[mTree_size])
      I am not sure why I am getting this.
      Any idea will help.