Forum Discussion
Add column based on two parameters
- 6 years ago
There are at least two ways of doing this one.
1. Add a column in both tables that is the concatenate the Date and Machine, make a relationship between them, and use RELATED() to bring the Goal # to the other table (or better yet just write a measure that gets the Goal # for your calculation)
2. LOOKUPVALUE will search multiple columns. In your case, something like this in your calculated column should do it
Goal = LOOKUPVALUE(Goal[Goal], Goal[Date], Table[Date], Goal[Machine], Table[Machine], 0) // 0 is the result to return if no value found
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
There are at least two ways of doing this one.
1. Add a column in both tables that is the concatenate the Date and Machine, make a relationship between them, and use RELATED() to bring the Goal # to the other table (or better yet just write a measure that gets the Goal # for your calculation)
2. LOOKUPVALUE will search multiple columns. In your case, something like this in your calculated column should do it
Goal = LOOKUPVALUE(Goal[Goal], Goal[Date], Table[Date], Goal[Machine], Table[Machine], 0) // 0 is the result to return if no value found
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
It worked ! Thanks.