Forum Discussion

ElodiePignato's avatar
ElodiePignato
Regular Visitor
2 years ago

DAX formula - Average

Hello everyone !

 

I have an issue with a DAX formula.

 

I have a table named "Incomind documents". It's one row per ticket (workload), a column with the status (done, on hold, to treat, etc.) and a column with the reception date.

 

I would like to calculate the average of incoming tickets for the last 12 months.

 

Any idea how to do that ?

 

Thanks !

7 Replies

  • Dangar332's avatar
    Dangar332
    Resident Rockstar

    hi, ElodiePignato 

     

     

    result =
     averagex(
         filter('Incomind documents',
            dateadd('Incomind documents'[reception date],-1,year)
                ),
         'Incomind documents[workload]
              )

     

    • ElodiePignato's avatar
      ElodiePignato
      Regular Visitor

      Thank you Dangar332 but I have this error message :

       

      "The function AVERAGEX cannot work with values of type String.

      • Dangar332's avatar
        Dangar332
        Resident Rockstar

        hi, ElodiePignato 

         

        i think your   'incomind documents'[workload]  is string type. so it could happen

        can you provide some sample data?