Forum Discussion

TimTruax's avatar
TimTruax
Regular Visitor
2 years ago

Average Deviation from the Mean

I am looking to write a DAX function that shows how much the average value for each day of the week deviates from the mean for the week. For a simple bar chart, I want to see Sun - Sat on the X axis, and average for each day showing a positive or negative percentage. For example, if the weekly average was 200, and the Sunday average was 150, I want to show the Sunday bar as -25%.

 

I am not interested in the standard deviation. Rather, I want to know the deviation from the mean for each day of the week.

 

Thank you, Power BI Community for your help

3 Replies

  • Hi,

    Assuming you have a proper date column in your dataset, share the data in a format that can be pasted in an MS Excel file.

    • TimTruax's avatar
      TimTruax
      Regular Visitor

      Ashish: Thank you for offering to look at my model to make a suggestion. How can I share a .pbix file in this community? (Not seeing an 'attachment' icon.)

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        You are welcome.  Upload the file to Google drive/One Drive and share the download link.