Forum Discussion

Julianvesga's avatar
Julianvesga
Frequent Visitor
6 years ago
Solved

Function to Get a result from 2 conditions

hi Team

my question is how i can get a resul from 2 conditions, bellow have a Table Mapping thta is the guia to know what is the cutofftime by process and the second table is my daiy table that a have to setup with de COT by TRX (transaction). 

 

 

 

table MappinG

Country       Subproceso     COT (cutofftime)

CO                      1                           14:00   

BH                      1                           14:00

CO                      2                           18:00  

GU                      3                           17:00

BH                      2                           16:00

CO                     3                            21:00   

 

TABLE2

Trx        Country          Subproucto    COT

1A            CO                     1                 (The result is 14:00)

2A            CO                     2

6A            CO                     3

3A            BH                     3

4A            BH                     3

5A             GU                    3 

 

 

best regards

 

 

Julian Vesga

  • Hi Julianvesga ,

     

    We can create a calculated column with following formula to meet your requirement:

     

    COT =
    LOOKUPVALUE (
        'Mapping'[COT (cutofftime)],
        Mapping[Country], [Country],
        Mapping[Subproceso], [Subproucto]
    )


    If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


    BTW, pbix as attached.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.