Forum Discussion
steamexpert
5 years agoRegular Visitor
Calculating weekly average for values
Hi,
I'm trying to calculate a dynamic weekly average that is calculated as I change the filters on the table below.
Current DAX I have is below, but it's not really working.
AvgOutput = calculate(SUMX(all(Project),Project[Name]) ) / CALCULATE(DISTINCTCOUNT(Project[Name]),ALL(Project[End_Date__c]))
In this example, the average would be 25.2, and I'm ok if it shows up as a column right next to "Count of Name"
TIA!
2 Replies
- amitchandakSuper User
steamexpert , Try a measure like
averageX(values(Project[End_Date__c]), CALCULATE(DISTINCTCOUNT(Project[Name])))
- steamexpertRegular Visitor
thanks for the quick response amitchandak , but something seems to be off with that calculation, see below. I also tried using End_Date__c (bins), but it didn't work either.