Forum Discussion
DASILAR1
3 years agoNew Member
VALUES AND ALL FUNCTION AS ARGUMENT FOR AVERAGEX
Good morning. I have a question to solve a DAX formula. After struggling for a long time, I believe I have identified the problem, but I have not yet been able to find a solution. I created a Measu...
- 3 years ago
I managed to find the solution. I'll leave it below in case anyone has a similar question.
MohammadLoran25
Solution Sage
3 years agoHi DASILAR1 ,
1-Create the measure:
ValueMeasure = SUM(Consulta[VALUE])
2-Create the desired measure:
AverageMeasureValue =
CALCULATE (
AVERAGEX ( VALUES ( Consulta[CustomerCode] ), [ValueMeasure] ),
FILTER (
Consulta,
Consulta[VALUE] <> 0
&& NOT ISBLANK ( Consulta[VALUE] <> 0 )
)
)
If this answer solves your problem, give it a thumbs up and mark it as an accepted solution so the others would find what they need easier.
Regards,
Loran