Forum Discussion
Nellis5
1 year agoRegular Visitor
How to return the previous date using a parameter selected range
I'm having trouble creating a measure to display previous dates from an order date column based on a parameter. I tried to make it a calculated column until I learned that parameters don't update in ...
- 1 year ago
Sometimes it just takes asking to find the answer. I was very close with the DAX I posted, I just had to add "ALLSELECTED" to the relation to make it work.
Final DAX, Change in bold
Previous = MINX(WINDOW(-[Number of Orders Value],REL,0,REL,ALLSELECTED(OrderTable),ORDERBY([Order Date],ASC),,PARTITIONBY([Customer]),MATCHBY([Order Number])),OrderTable[Order Date])
Nellis5
1 year agoRegular Visitor
Sometimes it just takes asking to find the answer. I was very close with the DAX I posted, I just had to add "ALLSELECTED" to the relation to make it work.
Final DAX, Change in bold
Previous = MINX(WINDOW(-[Number of Orders Value],REL,0,REL,ALLSELECTED(OrderTable),ORDERBY([Order Date],ASC),,PARTITIONBY([Customer]),MATCHBY([Order Number])),OrderTable[Order Date])