Forum Discussion
Anonymous
4 years agoNot applicable
DAX, lookupvalue
Hi all, I need help with the following: I have two tables in Power BI. The first table, "GSS", has a column "Overall Index" that shows the raw index score of employees for each month. I crea...
Anonymous
4 years agoNot applicable
Sorry, but I encountered an issue for 2 possible scenarios, hoping someone can help:
If the employee has an average overall index < 0.8, he should get 0 points and if the employee has an average overall index > 1, he should get 100 points.
With my current code below, it will not account for the above 2 scenarios:
Weighted Avg GSS Points = (LOOKUPVALUE('GSS Reference Pt Table'[Point],'GSS Reference Pt Table'[Index], rounddown(GSS[Average of Overall Index],2))
Thus, I edited it to the following:
Weighted Avg GSS Points = 0.1 * if(rounddown(GSS[Average of Overall Index], 2) < 0.8, 0, if(rounddown(GSS[Average of Overall Index],2) > 1, 100, (LOOKUPVALUE('GSS Reference Pt Table'[Point],'GSS Reference Pt Table'[Index], rounddown(GSS[Average of Overall Index],2)))))
Therefore, how do I refer the "0.8" and "1.0" from my second table into my code above?