Forum Discussion
Average quarter data by month
- 8 years ago
sssssssssssssss
- 8 years ago
I think I got it.
This is the measure:
Avg by Q = CALCULATE( SUM('Quarter'[USD Net Rev])/3, ALLEXCEPT('FiscalYMD', 'FiscalYMD'[Year Quarter]), VALUES(FiscalYMD[Year Quarter] ) )I also added two columns Year Month and Year Quarter to your date table:
Year Month = FiscalYMD[Year] & "-" & format(FiscalYMD[Month], "00")
Year Quarter = FiscalYMD[Year] & " Q" & FiscalYMD[Quarter]Then it looks like this:
Because I use VALUES of the quarters in the measure you can leave the quarters out of the table.
Here is the link to your file.
- 8 years ago
It works with me...
Do you have a date dimension table?
That would make it a bit easier. Then you can refer to quarters and months in your measures.
- waltheed8 years agoImpactful Individual
This may be what you need:
Create a new Measure:
Avg by Q = calculate(sum(FactOnlineSales[SalesAmount])/3 , all('Date'[CalendarMonth]))
And then another measure to sum the new one and your existing monthly total:
Total = [Your Monthly Totals] + [Avg by Q]
Would that work?
- siwyan_18 years agoRegular Visitor
sssssssssssssss
- siwyan_18 years agoRegular Visitor
Sorry, this actuall not solved my problem.
this is what I tried:
Avg by Q = CALCULATE(sum('Retail_Quarter'[USD Net Rev])/3,ALL('CalendarMonthYear'[MonthBeginDate].[Date]))
I tried to change the ',' marked in red above to ';' but it gives me error message saying ':' is not allowed.
Help Please!