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.

4 Replies

  • venal's avatar
    venal
    Icon for Memorable Member rankMemorable Member

    Julianvesga 

    Please refer the link with the PBIX file.

     

    If you have any queries or concerns, please let us know.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more

    If this post was helpful may I ask you to mark it as solution and give it some kudos?

    • Julianvesga's avatar
      Julianvesga
      Frequent Visitor

      Hi

       

      thank for your reply but i can get of link, could you please copy in this message.

       

      thank you

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    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.

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi Julianvesga ,


    How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

     

    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.