Hi, I am calculating %availability using a measure on tblDevice based on total downtime/availability . I want to join a static table tblAllowance which has allowance based on the %availability. How can I join ? I tried to do merge join between two tables , I couldn’t see %availability column to match as its a measure. Please advice.
To get the result you’re looking for, you don’t need to join the tables. The LOOKUPVALUE() function will easily handle this requirement. Here’s the entry from the eDNA KnowledgeBase:
Hi Brian,
I tried to put in excel sheet tbldevice , I made some dump data as not able to share pbix. In Cell D is a measure calculating dowtimehours/actualhours and it gets %. I am trying to compare this % with 2nd table and get allowance from 2nd table. 2nd table have around 30,000 rows values for all % values.
Okay, based on your sample data I constructed the following example. First I created a disconnected table based on the values of Availability, and then just harvested the selected value from that table just to have a measure to work with in the example.
This basically mimics the function of what LOOKUPVALUE() does. Note that in your example, one value of Availability is associated with more than one credit/bonus value in some cases. Thus in my measure I returned the MAX value of credit/bonus value, however based on your business rules you may want to change this to MIN.