Forum Discussion
AVERAGEX Function PowerBI
Anonymous , Use this measure using fx in constant line option
AVERAGEX(Values(T_Cycle_Takt_Time_Detail[Hours]) ,CALCULATE(DISTINCTCOUNTNOBLANK(T_Cycle_Takt_Time_Detail[Job_No]),'T_Cycle_Takt_Time_Detail'[Workcenter_Code] IN {"3-R0"}))
or use this as line
CALCULATE(
AVERAGEX(Values(T_Cycle_Takt_Time_Detail[Hours]) ,CALCULATE(DISTINCTCOUNTNOBLANK(T_Cycle_Takt_Time_Detail[Job_No]),'T_Cycle_Takt_Time_Detail'[Workcenter_Code] IN {"3-R0"})), allselected())
Hello,
@Amit, @Greg , @tamerj1 , @lbendlin
@olgad , @Sahir_Maharaj , @FreemanZ , @tamerj1 , @Greg_Deckler
Thanks for the input, but this is not helping either, it is yielding similar results like last time OR giving a totally different result like this:
Averagex Custom 1 is for the 1st DAX above and Averagex Custom 2 is for the 2nd DAX above.
AVERAGEX(Values(T_Cycle_Takt_Time_Detail[Hours]) ,CALCULATE(DISTINCTCOUNTNOBLANK(T_Cycle_Takt_Time_Detail[Job_No]),'T_Cycle_Takt_Time_Detail'[Workcenter_Code] IN {"3-R0"}))
The code above like you suggested is giving the same result which I have.
The 2nd code you suggested is giving the average value of 90.05 for all of the hours which does not make sense.
Do you have any other DAX code suggestion to address my concern?