"window"
1 TopicGet the average of X last date
Hello everyone, I stuck with a DAX query which doesn't seems impossible. I try to get the average for the 5 last date available by client. In the following exemple, I want average of the last 5 days available by Client In the exemple, Client 1 got 6 days. The last 5 are from 9/03/2024 to 20/03/2024. I want the average of those days I end up with this DAX query wich absolutly doesn't work 🙂 : AVERAGEX( WINDOW( -4,REL, 0,REL, SUMMARIZE(ALLSELECTED('Table'), 'Table'[Date], 'Table'[Client]), ORDERBY('Table'[Date],ASC), ,PARTITIONBY('Table'[Client]) ), CALCULATE(SUM('Table'[Valeur])) ) I need the last date value for my client scope Can you help me ?Solved750Views0likes3Comments