Forum Discussion
giuliapiazza94
4 years agoHelper IV
Price list problem
I have a price list like this and I have a sell table The final table should be like this I have created a key-word "product_date" --> for example a_05/2020 or a_07/20...
- 4 years ago
giuliapiazza94 This is essentially Lookup Min/Max: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
So, in your case:
Column = VAR __Date = 'SELL'[date] VAR __Product = 'SELL'[product] VAR __PriceDate = MAXX(FILTER('Table-Price',[product]=__Product && [date]<=__Date),[date]) RETURN MAXX(FILTER('Table-Price',[product]=__Product && [date]=__PriceDate),[price])
Greg_Deckler
4 years agoCommunity Champion
giuliapiazza94 This is essentially Lookup Min/Max: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
So, in your case:
Column =
VAR __Date = 'SELL'[date]
VAR __Product = 'SELL'[product]
VAR __PriceDate = MAXX(FILTER('Table-Price',[product]=__Product && [date]<=__Date),[date])
RETURN
MAXX(FILTER('Table-Price',[product]=__Product && [date]=__PriceDate),[price])- giuliapiazza944 years agoHelper IV
Greg_Deckler you are a genius 😊
thank you very much