Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have 2 tables.
The First with the calendar of the year (Calendario)
The Second with daily assistance. (Asistencia)
As shown below
I need to add a column to the attendance table that shows the previous average of the last 3 weeks (excluding the day) according to the day as for example
I did this Dax formula but only the attendance of the day and I do not know how to add the filter per day
Prom Anterior Diario = CALCULATE(AVERAGEX(Asistencia;Asistencia[Asistencia]);DATESBETWEEN(Calendario[Fecha];DATEADD(Asistencia[Fecha];-21;DAY);DATEADD(ResumenDiario[Fecha];-1;DAY))
Hi @jcabeza,
Please use the below DAX
Prom sAnterior Diario = CALCULATE(AVERAGEX(Asistencia,Asistencia[Asistencia]),DATESBETWEEN(Calendario[Fecha],DATEADD(Asistencia[Fecha],-21,DAY),DATEADD(Asistencia[Fecha],-1,DAY)))
I have got the below result from this DAX
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan
It's not the solution, but thanks
Hi @jcabeza
Can you please share what issue you got with this measure? What result does this show in your data?
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
96 | |
89 | |
73 | |
61 | |
58 |