Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
4 years ago
Solved

adding text to a measure

i have a measure that returns a number.

 

AverageApplicationsPerDay = averagex(values('Task Requested Date'[Date]), 'DFP Applications'[Application Review Count])
 
could i add text before it to display e.g "Average Applications Per Day - 2.742
  • jppv20's avatar
    jppv20
    4 years ago

    NewbieJono 

     

    This should work:

     

    AverageApplicationsPerDay =

    "Average Applications Per Day - " &

    format(averagex(values('Task Requested Date'[Date]), 'DFP Applications'[Application Review Count]),"0.00")

5 Replies

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi NewbieJono ,

    You can try below code:-

    AverageApplicationsPerDay =
    VAR result =
        AVERAGEX (
            VALUES ( 'Task Requested Date'[Date] ),
            'DFP Applications'[Application Review Count]
        )
    RETURN
        "Average Applications Per Day - " & result

     

    Thanks,

    Samarth

  • jppv20's avatar
    jppv20
    Solution Sage

    Hi NewbieJono ,

     

    You can use this measure:

    AverageApplicationsPerDay =

    "Average Applications Per Day - " &

    averagex(values('Task Requested Date'[Date]), 'DFP Applications'[Application Review Count])

     

    If I answered your question, please mark it as a solution to help other members find it more quickly.

  • how can i format the number to be only two decimal placements 

    • Samarth_18's avatar
      Samarth_18
      Community Champion

      You can do it by using below code:-

      AverageApplicationsPerDay =
      VAR result =
          AVERAGEX (
              VALUES ( 'Task Requested Date'[Date] ),
              'DFP Applications'[Application Review Count]
          )
      RETURN
          "Average Applications Per Day - " & ROUND ( result, 2 )
    • jppv20's avatar
      jppv20
      Solution Sage

      NewbieJono 

       

      This should work:

       

      AverageApplicationsPerDay =

      "Average Applications Per Day - " &

      format(averagex(values('Task Requested Date'[Date]), 'DFP Applications'[Application Review Count]),"0.00")