Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Using LOOKUPVALUE with inactive relationship

Hi,   I have an issue with LOOKUPVALUE returning values incorrectly.   I have two dimension tables in a snowflake scheme. One is 'Personnel' that contains data for 'current age' and 'age on leavi...
  • OwenAuger's avatar
    8 years ago

    Hi Anonymous

     

    Interesting, I can reproduce your issue if the relationship between Personnel and 'Age Group' has Cross Filter Direction set to "Both".

     

    Is that how the relationship is set up in your model?

     

    It would seem the options are:

    1. Change the Cross Filter Direction to Single (unless there is some reason it needs to be Both)
    2. Write the calculated column as something like:
      Age Group On Leaving = 
      VAR AgeOnLeaving = Personnel[Age On Leaving]
      RETURN
          CALCULATE (
              SELECTEDVALUE ( 'Age Group'[Age Group] ),
              ALL ( Personnel ),
              'Age Group'[Age] = AgeOnLeaving
          )

    Regards,

    Owen