Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Add monthly average to a daily visual

Hi

 

I need to add data labels with monthly average to this serie. The visual represents daily values but my client wants only the monthly ones on it. Do you have any idea?

Regards

 

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Sorry v-chuncz-msft, but I think thast this solution doesn't fit. It will show monthly serie with monthly average values. I need dairy serie with monthly average values.

      Thanks anyway.

  • Anonymous's avatar
    Anonymous
    Not applicable

    You may need a measure for this, like :

     

    # Orders last 30 days =
    CALCULATE (
        COUNT ( 'Orders'[OrderKey] ) / 30;
        USERELATIONSHIP ( 'Date'[Date]; 'Orders'[Date] );
        DATESINPERIOD ( 'Date'[Date]; LASTDATE ( 'Orders'[Date] ); -30; DAY )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Sorry Anonymous, but... what happens with 28, 29 and 31 days months?

      Thanks

      • Anonymous's avatar
        Anonymous
        Not applicable

        It was an example how to calculate average over x days. For months you can use something like:

        AvgLast1Month = CALCULATE(AVERAGE(Orders[amount]),DATESINPERIOD(Orders[Date],LASTDATE(Orders[Date]),-1,MONTH))/1

        AvgLast3Months = CALCULATE(AVERAGE(Orders[amount]),DATESINPERIOD(Orders[Date],LASTDATE(Orders[Date]),-3,MONTH))/3

        etc.

         

        Hope this will help you.

        Kind regards