Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Total Average measure

I am wondering if anyone knows of a Avg measure that would easily give the output in table 2 below. The measure (attached below) gives the output shown in table 1 and this isn't what I want. The aim is to have a chart similar to that shown at the bottom of this post below with the average line across the middle of the chart.

 

 

 

Average = 
CALCULATE(
AVERAGEX(
KEEPFILTERS(VALUES(dim_date[MonthYear])),
Query1[rowcount]),
ALLSELECTED(dim_date[MonthYear])
)

 

 

 

Table 1  Table 2  
MonthYearNumber of ContactsAverageMonthYearNumber of ContactsAverage
Apr-1751775177.00Apr-1751775544.83
May-1757715771.00May-1757715544.83
Jun-1758045804.00Jun-1758045544.83
Jul-1758395839.00Jul-1758395544.83
Aug-1752845284.00Aug-1752845544.83
Sep-1753945394.00Sep-1753945544.83
Total332695544.83Total332695544.83

 

 

  • Anonymous You don't generally see a SUMMARIZE used with 2 different tables.

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Use the Analytics Pane?

     

    Or This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

    The pattern is:
    MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
    MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
    AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
    etc.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your response Greg. I am currently using 2 tables to populate my chart; a monthyear column in my calendar table and the sum total of contacts called Rowcount for each monthyear from a table called Query1. If i am using your 'AvgScoreMeasure', what value do i enter for the following;

      • Table
      • Table[Group]
      • "Measure"
      • [YourMeasure]
      • Anonymous's avatar
        Anonymous
        Not applicable

        Greg_Deckler 

        I tried the dax below but it didn't give the average output in table 2. Is there something I have possibly done wrong?

         

        Mean = 
        AVERAGEX(
        SUMMARIZE(dim_date,dim_date[MonthYear],"MeasureNew",Query1[rowcount]),[MeasureNew])
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg, 

      I am trying to avoid using the analytics pane just because I need to also create a standard deviation, lower control limit and an upper control limit.