Forum Discussion
GlitchedDuck
4 years agoFrequent Visitor
Average Count Per Day/Week/Month Card
Hi All, I'm trying to create a few card visualization that shows average amount of invoices per Day/Week/Month. In my data i have created_date, Invoice_Number and want to show the average in ...
americanomuerto
3 years agoHelper I
I would like for there to be a solution for this topic as I have a similar issue. I had a very well working Measure until we passed to the new fiscal year and it all fell apart.
Measure 1:
Irrigation Inspection Count =
CALCULATE(DISTINCTCOUNT(WCTS_INSPECTION[REQUEST_ID]),
WCTS_INSPECTION[INSPECTION_TYPE] = "IRR")
Measure 2:
Average Irrigation Audits per Week =
VAR CurrentFiscalWeek = MAXX(FILTER(ALL(DimDate), DimDate[Date] = TODAY()), DimDate[Fiscal WeekNumber])
return
[Irrigation Inspection Count]/CurrentFiscalWeek
Once I started the new fiscal year, it divided the total inpection count (208) from the previous fiscal year by the current fiscal week number (2).
AverageX function is giving me an incorrect result of 4.43, rather than 4 (208/52).
Avg = AVERAGEX(VALUES(DimDate[Fiscal WeekNumber]),[Irrigation Inspection Count])
- americanomuerto3 years agoHelper I
Figured out the issue I was having. I just needed to make a slight modification to Measure 2
Average Irrigation Audits per Week = VAR CurrentFiscalWeek = MAX(DimDate[Fiscal WeekNumber]) return [Irrigation Inspection Count]/CurrentFiscalWeek