Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Adding Average Column

Hi

My question is more about visualization. I'm trying to create a table similar to the one below.

Number of orders each month is sum of quantity. But I want to add additional column which is basically the monthly average of each raw. I'm just struggling on how to do so. Appreciate the help.

 

 

Item#Item DescriptionJan-21Feb-21Mar-21Apr-21May-21Jun-21Jul-21Aug-21Sep-21Oct-21Nov-21Dec-21Monthly Average
A-123Pencil5105251530105510152513
B-321Pen2515351045305101520251020
D-987Papers1001507550200250150100502550100108

8 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    If your current measure is called "TotalQty" and your YM column is called "Month" in your Date table (for example), you can use a measure expression like this to get your result.  Use it in place of your existing measure in your visual, and you will get the average monthly value in the Total column.

     

    Qty = AVERAGEX(DISTINCT(Date[Month]), [TotalQty])

     

    Pat

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks mahoneypat . I was keen to know which visualization to use to show similar visualization to the one I showed above.

      If I use the "Matrix", I can't add an additional column at the end of the table that will show the row average.

       

       

       

  • Hi,

    If you have a Calendar Table, then this can be solved.  Share the link from where i can download your PBI file.

      • aj1973's avatar
        aj1973
        Community Champion

        Hi Anonymous 

        You can use any online services like Onedrive, google drive...and then share the link