Forum Discussion
WishAskedSooner
1 year agoContinued Contributor
Generating a Lookup Table Help
HI Experts! I am having difficulty generating a lookup table that I need for later processing in a measure. Here is a sample of my requirement and the problem. I have the following table call...
- 1 year ago
Hey WishAskedSooner ,
It looks like the issue is coming from how the AVERAGEX function is being used. Try the DAX expression:
VAR _AvgNewVal = SUMMARIZE( 'Fact', 'Fact'[AID], "AVG NEW VAL", AVERAGEX( FILTER( _NewVal, 'Fact'[AID] = EARLIER('Fact'[AID]) ), [NEWVAL] ) )If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Nasif_Azam
1 year agoSuper User
Hey WishAskedSooner ,
It looks like the issue is coming from how the AVERAGEX function is being used. Try the DAX expression:
VAR _AvgNewVal =
SUMMARIZE(
'Fact',
'Fact'[AID],
"AVG NEW VAL", AVERAGEX(
FILTER(
_NewVal,
'Fact'[AID] = EARLIER('Fact'[AID])
),
[NEWVAL]
)
)
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
- WishAskedSooner1 year agoContinued Contributor
- Nasif_Azam1 year agoSuper User
Thank you so much for your kind words! I’m glad I could help. 😊