Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Using Lookupvalue in a Measure with two variables based on two measueres

Hi everybody,

 

I need your held lease.

I would like to lookup a value in different table (Is not connected to any table in data modell, because it doesnt primary key) based on two criteria. Those two criteria are calculated in two measures. They are called Produktivität & Nacharbeitsaufwand.

 

I have created a new measure in which I want to use lookupvalue to get my value.

Measure:

VAR Prod=Produktivität

VAR Std_to=Nacharbeitsaufwand

VAR Value= lookupvalue(Table1 [Prämie];Table1 [Produktivität(%)];Prod;Table 1[Nacharbeit (h)];Std_to)

Return=Value

 

Unfortunately, it doesn´t work.

 

Does anybody has an idea why or can give my some solutions.

 

Thanks to everybody!!

Tendo

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    What you are trying to create is a calculated column or measure? And are the variables VAR Prod=Produktivität and VAR Std_to=Nacharbeitsaufwand measures or the fact fields of the table? Could you please provide some sample data in Table1(exclude sensitive dataand your expected result with logic and special examples? Thank you.

    Best Regards

8 Replies

    • Dinesh_Suranga's avatar
      Dinesh_Suranga
      Continued Contributor

      Anonymous 

      Try SelectedValue DAX function.

      If you want any help for the function please reply to this message.

      Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    The syntax should work?

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    What you are trying to create is a calculated column or measure? And are the variables VAR Prod=Produktivität and VAR Std_to=Nacharbeitsaufwand measures or the fact fields of the table? Could you please provide some sample data in Table1(exclude sensitive dataand your expected result with logic and special examples? Thank you.

    Best Regards

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

       

      I ´m trying to create a calculated measure. The variables VAR Prod= Productivity & VAR Std_to=Quote Rework are measures.

      Those two measures are based on star schema with many tables.

      Test is the final measure, which doesn´t work.

      The result I need can be found in table Bonus. The column is called Bonus as well.

      E.g. Februar:

      Prouctivity: 93,68% à 94%

      Quote Rework: 0,10

      Test: 20,61375

       

      Mai:

      Productivity: 107,26% à 107%

      Quote Rework: 0,10

      Test: 19,7175

       

      Thanks for your help!

      Tendo