Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi I cannot work out how to do the following in Power BI. I need to create a column with a value of the position of the previous day based on the product ID.
I have a large table of product IDs. Each date a product ID has a position. The position ID's are unique for each day, but the ProductID may be present in mutiple PositionID's, so are not unique.
So in the example below Product ID 5284 is in position 10019025 o the 5th Dec. I want the new column to return the position of the previous day for that product ID, which is 10019023. I have been attempting to achieve this with Lookup Value but with no success, any suggestions welcome!
Solved! Go to Solution.
Column = CALCULATE(MAX(Sheet2[Position]),ALLEXCEPT(Table,Table[ProductID]),Table[Date]=EARLIER(Table[Date])-1)
Paul Zheng
Don't forget to hit THUMBS UP and mark it as a solution if it helps you!
Column = CALCULATE(MAX(Sheet2[Position]),ALLEXCEPT(Table,Table[ProductID]),Table[Date]=EARLIER(Table[Date])-1)
Paul Zheng
Don't forget to hit THUMBS UP and mark it as a solution if it helps you!
Hi @kenmuir71
try a column
Column = LOOKUPVALUE(Table1[Position];Table1[ProductId];Table1[ProductId];Table1[Date];Table1[Date]-1)
do not hesitate to give a kudo to useful posts and mark solutions as solution
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |