lookup - PowerPivot multiple columns approximate match -
lookup - PowerPivot multiple columns approximate match -
i want find out member_status on date product purchased.
table contains 3 fields: member_name
, member_status
, change_date
(this date fellow member started have status).
table b contains 3 fields: member_name
, product_purchased
, purchase_date
.
both tables have multiple records each fellow member (e.g. fellow member may have had many different statuses on years , fellow member may have purchased many different products on different days) cannot utilize standard powerpivot relationship.
i think need indirect lookup (look purchase_date
table b , find closest before matching change_date
table fellow member matches in both tables , find right member_status
field each record in table b. have not been able figure out formula in powerpivot accomplish this.
any suggestions?
here sample info file: http://www.files.com/shared/5460044b6d805/howtorelatetwotableswithnonuniquerecords.zip
i found great blog on topic @ http://javierguillen.wordpress.com/2012/08/05/approximate-match-with-multiple-criteria-in-dax-part-ii/ , figure out solution. here formula worked me. =calculate( lastnonblank(table2[member_status],1), filter( table2, table2[date]=calculate(lastnonblank(table2[date],1),filter(table2,table2[member_name]=table1[member_name] && table2[date]<=table1[purchase_date]) )&& table2[member_name]=table1[member_name]))
lookup powerpivot dax approximate
Comments
Post a Comment