Moyenne 12 mois glissants sur effectif

Home – Le CFO masqué Forums Power BI Moyenne 12 mois glissants sur effectif

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #135882
    Laurent Sanchez
    Participant

    Bonjour à tous,
    j’ai une mesure qui calcule l’effectif et que j’affiche mois par mois : (et qui fonctionne bien 😉

    Staff =
    VAR MinDate = MIN(‘Calendar'[Date])
    VAR MaxDate = LASTDATE(‘Calendar'[Date])
    RETURN
    CALCULATE(
    COUNTROWS(TableEffectif),
    EGIS[Date of seniority] <= MaxDate,
    EGIS[Date of leaving company + 1] > Maxdate || ISBLANK (EGIS[Date of leaving company + 1]),
    ALL(‘Calendar’))

    J’aimerais calculer maintenant la moyenne sur les 12 mois glissants, et j’utilise cette mesure :

    Moving Avg =
    AVERAGEX(
    DATESINPERIOD (
    ‘Calendar'[Date],
    MAX ( ‘Calendar'[Date] ), -12, MONTH),[Staff])

    Mais je n’obtient pas le bon résultat (j’ai un écart)

    Avez-vous une idée ?

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.