need some help with a Dax average calculation

  • need some help with a Dax average calculation

    Posted by DSC Communities on July 13, 2022 at 10:51 am
    • Randy Etheridge

      Member

      July 13, 2022 at 10:51 AM

      I have column of data.Ā  it is a fixed days calculation.Ā  so it takes the resolved date, subtracts the open date and gives an integer day value back

      1
      2
      3
      4
      5
      6
      7
      etc
      I need an average of the days 4 – 30 only
      not sure the formula

      thinking something like this

      Avg4_30Days = Averagex(FILTERs(incidents_av[sladays],between 4 and 30))
      any help is appreciated.Ā  thank you.

      ——————————
      Randy Etheridge
      Veritiv Corporation
      P&F USA Inc
      Torrance CA
      770-315-9670
      ——————————

    • Adam Artur Boltryk

      Member

      July 13, 2022 at 1:50 PM

      Hi Randy,

      Avg4_30Days =

      CALCULATE(
      Ā Ā Ā Ā Ā Ā  AVERAGE([Column_To_Calculate]),
      Ā Ā Ā Ā Ā Ā  [sladays]>4 && [sladays]<30
      Ā Ā Ā Ā Ā Ā  )

      Regards,

      ——————————
      Adam Artur Boltryk
      Business Analyst
      ——————————
      ——————————————-

    • Randy Etheridge

      Member

      July 13, 2022 at 2:43 PM

      ok so I did this

      Avg4_30days = CALCULATE(Average(incidents_av[sladays]),[sladays]>=4&&[sladays]<=30)

      so my column containing the days is SLAdays.Ā  the error message says the [Sladays] in the 4 to 30 statement is not valid.

      I am playing with it, but so far nothing, but thanks for the additional information.

      ——————————
      Randy Etheridge
      Veritiv Corporation
      P&F USA Inc
      Torrance CA
      770-315-9670
      ——————————
      ——————————————-

    • Randy Etheridge

      Member

      July 13, 2022 at 2:45 PM

      just one more comment the view that PowerBI is using is incidents_av

      one of the columns of data is SLAdays (calculated in the view)

      ——————————
      Randy Etheridge
      Veritiv Corporation
      P&F USA Inc
      Torrance CA
      770-315-9670
      ——————————
      ——————————————-

    • Randy Etheridge

      Member

      July 13, 2022 at 2:52 PM

      never mind typo, works perfect thanks

      ——————————
      Randy Etheridge
      Veritiv Corporation
      P&F USA Inc
      Torrance CA
      770-315-9670
      ——————————
      ——————————————-

    DSC Communities replied 3 years, 8 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘need some help with a Dax average calculation’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!