Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hola...Estoy tratando de encontrar una medida DAX y que me muestre el promedio de los ultimos 13 meses del campo existencias , El resultado deberia ser 2,713,867 .
La formula DAX que estoy usando para miostrar el promedi ode los 12 meses es :
VAR RESULT = CALCULATE(AVERAGEX(VALUES(DIM_TAB_CALENDAR[MES]),[Existencias]),PERIOD) RETURN RESULT
Hi @JoseLuisC ,
Please try something like this:
Existencias_13M =
VAR LastSelectedDate = MAX(DIM_TAB_CALENDAR[DATE]) VAR PERIOD = FILTER(ALL('DIM_TAB_CALENDAR'),[DATE]<=EOMONTH(LastSelectedDate,0)&&[DATE]>EOMONYH(LastSelectedDate,-14))
VAR RESULT = CALCULATE(AVERAGEX(VALUES(DIM_TAB_CALENDAR[MES]),[Existencias]),PERIOD) RETURN RESULT
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
105 | |
69 | |
48 | |
47 | |
47 |