Forum Discussion
Anonymous
7 years agoNot applicable
Most recent value by material by customer
Im trying to calculate my company's list prices by customer but, because our data isn't strictly a relational table (other sales info) many of these are repeated and depending on the date, the prices...
jdbuchanan71
Super User
7 years agoHello Anonymous
Give this a try
Max Book Date =
VAR Customer = SELECTEDVALUE(Book[Customer])
VAR Material = SELECTEDVALUE(Book[MaterialNo])
RETURN
CALCULATE(
MAX(Book[BookDate]),
FILTER(
ALL ( Book[BookDate], Book[Customer], Book[MaterialNo]),
Book[Customer] = Customer && Book[MaterialNo] = Material
)
)*modified a bit so we are not filtering the entire book table.
- Anonymous7 years agoNot applicable
circular
I had to change the names but its the same deal. Got an error "circular dependency"- jdbuchanan717 years ago
Super User
You will need to delete your first calculated column in order for the new one to calculate. Also, I did mine so it would work as a measure. You woull not need the SELETEDVALUE in the variables if you are doing it as a calculated column.
- Anonymous7 years agoNot applicable
It did work as a measure but I think I need it to be a calculated column. Thanks for all the help thus far this is sort of out of my depth haha