rolling averages
4 TopicsLine Chart Legend Rolling Average
Have this table of data in power billing with thus measure. Issue I'm running into is when I create a line chart the rolling average is calculated correctly (dates on x axis rolling on your axis). If I add [Name] to legend the names A and B show up on the legend but there remains only 1 line with the total rolling average and not two lines with rolling average for both A and B. Any help would be appreciated RollingMean6Months = VAR CurrentDate = MAX('Charge'[Date]) VAR SixMonthsAgo = EDATE(CurrentDate, -6) RETURN AVERAGEX( FILTER( ALL('Charge'), 'Charge'[Date] <= CurrentDate && 'Charge'[Date] > SixMonthsAgo ), 'Charge'[Value] )Solved1.1KViews0likes4Comments4 / 13/ 52 Week Rolling Averages
Hi I am trying to create a number of cards that contain the following rolling averages. 4 week, 13 week and 52 week. I don't know what measure to create in order to achieve these reults. I can try and send the sample file but not sure best way to attach it. Link to sample file attached https://1drv.ms/u/s!AiZ1-kl9lagZgt4olcKdIRRuzIxiEg?e=bbrnvL Data Table Calendar Table Visual I am trying to achieve for weekly averages Weekly Sum Matrix already builtSolved2.4KViews0likes7CommentsRolling Average on a Percent Value
Hi everyone, I am having trouble trying to calculate a rolling average of a percent measure. I have a Calendar Table that is connected to a Transactions Table. The Transactions Table is made of the following columns: Date TransactionTypeID TransactionDescription DebitAmount CreditAmount I'm calculating three measures: Expenses = CALCULATE ( SUM (Transactions[Debit Amount]) - SUM (Transactions[Credit Amount]), Transactions[TransactionType ID] IN {"201", "202"} ) Revenue = CALCULATE ( SUM (Transactions[Credit Amount]) - SUM (Transactions[Debit Amount]), Transactions[TransactionType ID] IN {"101", "102"} ) Savings Rate = DIVIDE ( [Revenue], [Expenses], 0 ) - 1 The goal, is to calculate a Rolling Average of the Savings Rate in the last 3 and 12 months. I have tried this suggestion (https://community.powerbi.com/t5/DAX-Commands-and-Tips/Rolling-average-last-3-months/m-p/936915) but I'm not getting the result Here it is the excel and PBI with some sample data: Sample DataSolved1.2KViews0likes4CommentsAverage of Top 5 days over the past 365 days (1 year)
Hello, I'm stuck trying to calculate the average of my 5 highest production days over the past 365 days, or technically it would be 365 days from the last production entry date. Currently, I believe I'm able to calculate the rolling average of all production over the last 365 days, but I'm stuck identifying the top 5 days and calculating the average of those days. I have the below measure so far. As a FYI, [TPAOH] is the metric I'm trying to capture the average of the top 5 on. There are only two tables I'm using, which are daily production and a dates table. PROD 5= VAR NumOfMonths = 12 VAR LastCurrentDate= MAX(Dates[Date]) VAR Periodex = DATESINPERIOD(Dates[Date], LastCurrentDate, -12, MONTH) VAR Result = CALCULATE( AVERAGEX( VALUES('Dates'[Date]), [TPAOH]), Periodex) VAR FirstDateInPeriod = MINX(Periodex, 'Dates'[Date]) VAR LastDatewithProd = MAX('Daily Production'[Date]) RETURN IF(FirstDateInPeriod <= LastDatewithProd, Result)772Views0likes2Comments