Forum Discussion
vally57
Helper I
2 years agoAveragex is not working as expected.
Hello Experts, I am trying to create an average of a measure based on a column called Engagement_Name. For this I have written dax as follows: average = AVERAGEX(VALUES(Audit[ENGAGEMENT_NAME]),[...
- 2 years ago
vally57 - You will not be able to visualise it in the table. but the below DAX works fine for your requirement:
VAR numerator = SUMX( VALUES( 'Date'[Fiscal Year] ), [Adequate_FYTD_Audit] ) VAR denominator = CALCULATE(DISTINCTCOUNT( 'Date'[Fiscal Year] ), FILTER( Audit, COUNT( Audit[ENGAGEMENT_NAME] ) > 0 )) RETURN DIVIDE( numerator, denominator , 0 )Suggest you visualise the Average in a card, otherwise your DAX will need to be very complex, and I have just tried many different methods and none work.
bhanu_gautam
Super User
2 years agovally57 , First check your measure
Adequate_FYTD_Audit = SUM(Audit[Adequate_FYTD_Audit_Column])
Then update second measure as
Average_Adequate_FYTD_Audit =
AVERAGEX(
VALUES(Audit[ENGAGEMENT_NAME]),
CALCULATE([Adequate_FYTD_Audit])
)
vally57
Helper I
2 years ago