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/2020 but I don't know how connect key-words without connection.
Have you some ideas?
Thank you all
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])
2 Replies
- Greg_DecklerCommunity 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])- giuliapiazza94Helper IV
Greg_Deckler you are a genius 😊
thank you very much