all i am trying to calculate average selling price ( dollars / quantity )for an item that is sold in the company . The calculation method is to find unique values based upon the key ( which is Item & region code& week ) everything is fine until when there exits a match based upon the key . The issue arrives when there is no match , the calculation in this scenario is to find unique values based upon the key ( which is Item & region code& week minus one ) . i tried various methods by doing all the necessary calculations for Item & region code& week minus one separately in the script and joined to the data model ( didn't work). i did some front end expression by using variables didn't work . any help would be great . All the tables in the dashboard are connected by unique key ( which is Item & region code& week ).