Forum Discussion

ranggafirmansya's avatar
ranggafirmansya
Regular Visitor
8 years ago
Solved

lookup value from table

Hello,
I am new to this forum and fairly new to Power BI


I am trying to lookup value from table service with a coloumn id_operation. relation of both table is coloumn vincode.

how to lookup value with category id_operation values "1" in coloumn data ?

Following is a table :

 

 

please help for my case.

thanks.

  •  

    Hi@ ranggafirmansya 

    When you add a column, It returns values must be one.

    You need to add another condition:

    SERVICE[ID_OPERATION]=1

    data = LOOKUPVALUE(SERVICE[date],SERVICE[VINCODE],CUSTOMER[VINCODE],SERVICE[ID_OPERATION],1)

    Result:

     

    Best Regards,

    Lin

     

4 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

     

    Hi@ ranggafirmansya 

    When you add a column, It returns values must be one.

    You need to add another condition:

    SERVICE[ID_OPERATION]=1

    data = LOOKUPVALUE(SERVICE[date],SERVICE[VINCODE],CUSTOMER[VINCODE],SERVICE[ID_OPERATION],1)

    Result:

     

    Best Regards,

    Lin

     

  • mmace1's avatar
    mmace1
    Impactful Individual

    LOOKUPVALUE is the function you probably want. 

     

    I think it's easiest to just start typing data = LOOKUPVALUE(  and follow the tooltips, but in the end you will use something like this: 

     

    Data =LOOKUPVALUE(Service[ID_OPERATION],Service[VinCode],WhateverThisTableNameIs[Vincode])

     

     

     

     

     

    • ranggafirmansya's avatar
      ranggafirmansya
      Regular Visitor

      I have tried according to your suggestion, but I found the following error:

       

       

      what's the solution ?