moving average for measures
5 TopicsDynamic mean for control charts based on rules
Hello, I am trying to create a control chart based on a set of rules. My mean and standard deviation should change based on set of mentioned rules. Standard rules to calculate the control chart are as follows 1. to calculate mean/ average the minimum data points are 5. 2. To calculate standard deviation the minimum data points are 15. The required rules for the visualization 1. If seven consecutive points appear above or below the MEAN, the MEAN for the past seven points is recalculated. This is where we would look at the seven points ahead from the first point where it changed. 2. If seven consecutive points are moving either up or down the MEAN is recalculated on the past seven points. This again is where we would look at the seven points ahead from the first point where it changed. 3. If fifteen consecutive points are within +/- 1.0 standard deviation of the MEAN, the standard deviation, UCL and LCL are recalculated. Beginning to the system change point (back to the start of the 15 data points that triggered the recalc). Newly calculated means and standard deviations are used for rule evaluation on the next data points Sample data is as follows: Fiscal_Week Returns 5/7/2022 4630 5/14/2022 4800 5/21/2022 5069 5/28/2022 2789 6/4/2022 4596 6/11/2022 5275 6/18/2022 5172 6/25/2022 5219 7/2/2022 5101 7/9/2022 5020 7/16/2022 5327 7/23/2022 5001 7/30/2022 5221 8/6/2022 5309 8/13/2022 5225 8/20/2022 5475 8/27/2022 5291 9/3/2022 5371 9/10/2022 4961 9/17/2022 5091 9/24/2022 5355 10/1/2022 4049 10/8/2022 4729 10/15/2022 4869 10/22/2022 4417 10/29/2022 4030 11/5/2022 3698 Sample graph : Note: Not based on above mentioned data amitchandak Greg_Deckler Mikelytics mangaus1111843Views0likes2CommentsGrouped moving average for defined
Hi All, I have a table like this Countries Cities Years Temperature Country1 City1 Year1 Temperature(value) Country1 City1 Year2 Temperature(value) Country1 City1 Year3 Temperature(value) Country1 City2 Year1 Temperature(value) Country1 City2 Year2 Temperature(value) Country1 City2 Year3 Temperature(value) Country2 City3 Year1 Temperature(value) Country2 City3 Year2 Temperature(value) Country2 City3 Year3 Temperature(value) Country2 City4 Year1 Temperature(value) I would like to calculate the moving average temperature by City and Country. All of my previous attempts have slipped through the Country/City groups meaning that moving averages contained data from previous cities and years. Is there any solution that somehow strictly calculates inside the boundaries? The intended solution would look like this for a 2-year moving average Countries Cities Years Temperature Temp Moving Average Country1 City1 Year1 Temperature(value) - Country1 City1 Year2 Temperature(value) M.AVG1 Country1 City1 Year3 Temperature(value) M.AVG2 Country1 City2 Year1 Temperature(value) - Country1 City2 Year2 Temperature(value) M.AVG1 Country1 City2 Year3 Temperature(value) M.AVG2 Country2 City3 Year1 Temperature(value) - Country2 City3 Year2 Temperature(value) M.AVG1 Country2 City3 Year3 Temperature(value) M.AVG2 Country2 City4 Year1 Temperature(value) - I would be very grateful even if someone only pointed out the problem or directed me in the right direction.Solved545Views0likes1CommentInserting Moving average to Visuals with Month yearly trend
hi having problem with this visual any suggestion how to insert the filter of mma 3mma 12mma in my visual is montly share of market by company measure: SOM = divide(sum(mv_fact_sales_aggr[Wfactor Sales]),CALCULATE(sum(mv_fact_sales_aggr[Wfactor Sales]),ALLSELECTED(mv_fact_sales_aggr[company],mv_fact_sales_aggr[brand_family_name],mv_fact_sales_aggr[brand_name],mv_fact_sales_aggr[product_name],mv_fact_sales_aggr[volpricetier],mv_fact_sales_aggr[regional],mv_fact_sales_aggr[zone],mv_fact_sales_aggr[area],mv_fact_sales_aggr[Year],mv_fact_sales_aggr[price_segment],mv_fact_sales_aggr[Weighting Factors],mv_fact_sales_aggr[segment],mv_fact_sales_aggr[product_classifier]),ALL(mv_fact_sales_aggr[brand_family_name])),0)*100 and im using switch for my filter measure for 3mma : 3MMA SOM = CALCULATE(AVERAGEX(values(mv_fact_sales_aggr[MonthYear]),[SOM]),DATESINPERIOD(mv_fact_sales_aggr[date],LASTDATE(mv_fact_sales_aggr[date]),-3,MONTH)) Is it possible to filter it by Moving average with a monthly chart?630Views0likes3CommentsCreating a (set of) measure(s) to sum values with a duplicate date, then apply rolling average
Hi, For context, I run a small game development studio with some friends. We have a team of volunteers we are looking to reimburse for their time. We have created a plugin that logs users' interactions and commands per world they work on. I am currently working on a tool that generates activity reports which will be used to determine how active (activity factor) someone was which in turn will calculate their final pay. I have got something half-decent set up using a date-table, some simple DAX functions, etc. In our data tables, interactions are logged per date, per world. This could look something like this: Date World Staff member Interactions 25-03-2021 Cave Tom 1452 25-03-2021 Overworld Tom 334 25-03-2021 Hell Roger 4782 26-03-2021 Cave Tom 245 26-03-2021 Overworld Ben 24962 The activity factor calculation is as follows: (3-month moving average of interactions per staff member)/(team average of interactions in calendar year) * 100 I am using a slicer to achieve this per staff member. The problem I am having is that the rolling average takes an average across all rows which is skewing the results. For example, the average for Tom in the example above would be (1452 + 334 + 245) / 3 = 677 without summing, ((1452 + 334) + 245) / 2 = 1015.5 with. Link to file: https://we.tl/t-2WG7G4YzzW I have done research on the issue but am completely stumped - I hope you can help me! Let me know if you need any further info. Best, GuusSolved1.3KViews0likes5CommentsAlternative for AverageX
Hi, I have following working dax code. Since the data volume is high, it runs slow and gives memory error when filtered to lowest level. Is there a better alternative to using @AverageX? The code is: Average Balance (Period) = AVERAGEX( filter ( ALLSELECTED('Date'[Date])|and('Date'[Date]>=min('Date'[Date])|'Date'[Date] <= max ('Date'[Date])))| [Daily Average Balance] ) where, Daily Average Balance = if (ISBLANK([(Cumulative) Opening Balance])| [(Cumulative) Closing Balance]| ([(Cumulative) Closing Balance]+[(Cumulative) Opening Balance])/2 ) Since [Daily Average Balance], [(Cumulative) Closing Balance] & [(Cumulative) Opening Balance] all are measures, I am unable to use Average function. Thanks in advance! Shailee.4.3KViews0likes7Comments