Forum Discussion

chocy's avatar
chocy
Frequent Visitor
7 years ago

LOOKUP DAX FUNCTION help please :(

Hi,

 

i neep help with a dax function

 

NATURAL ACCOUNT 3 IS PARENT OF NATRUAL ACCOUNT 4. BUT I WANT THE LOOKUP COLUMN TO SHOW ALL CHILDREN OF 550P EXCEPT 550K AS 550P…. AND ALSO LOOKUP AND SHOW 521Q AND 501Q on there own…… NOTE THIS IS JUST AN EXAMPLE BUT NAT ACCOUNT LVL 4 HAS 100 OR SO DIFFERENT VALUES.

 

    CURRENT   EXPECT 
ASSUMED LOOKUP TABLE  natural account lvl4natural account lvl3NEW COLUMN natural account lvl4natural account lvl3NEW COLUMN
550W  550Q550P  550Q550P550P
550K  550W550P  550W550P550P
550L  501Q50PP  501Q50PP501Q
550N  550W550P  550W550P550P
550Q  501Q50PP  501Q50PP501Q
521Q  550L550P  550L550P550P
   550L550P  550L550P550P
   521Q50PP  521Q50PP521Q
   550N550P  550N550P550P
   550N550P  550N550P550P
   550N550P  550N550P550P
   850P550P  850P550P550P
   550K550P  550K550P550K
   550K550P  550K550P550K

2 Replies

  • v-cherch-msft's avatar
    v-cherch-msft
    Microsoft Employee

    Hi chocy

     

    It seems you may create the calculated column as below. If it is not your case, please explain more about your expected output and give more data sample.

    Column =
    IF (
        'CURRENT'[natural account lvl4] <> "550K"
            && 'CURRENT'[natural account lvl3] = "550P",
        'CURRENT'[natural account lvl3],
        'CURRENT'[natural account lvl4]
    )
    

    Regards,

    Cherie

    • v-cherch-msft's avatar
      v-cherch-msft
      Microsoft Employee

      Hi chocy

       

      Could you tell me if your problem has been solved? If it is,kindly mark my answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.

       

      Regards,

      Cherie