Forum Discussion
GuilhermeDoeli
3 years agoNew Member
Total value of table wrong based on summarized rows
Hi everybody! May someone help me with dax formula for this problem please? I tried so much but i cant resolve that... I have this table with three columns (MATRICULA, PONTOS, ID). My ob...
barritown
Solution Sage
3 years agoHi GuilhermeDoeli,
If it is okay to replace BLANK with a zero, you can use the approach below:
In plain text:
MEDIA Pontos totals =
VAR _tbl = SUMMARIZE (
data, data[BENEFICIARIO],
"Totals",
VAR CurrentBENE = [BENEFICIARIO]
VAR MaxID = MAXX ( FILTER ( data, data[BENEFICIARIO] = CurrentBENE ), [ID] )
RETURN MINX ( FILTER ( data, data[BENEFICIARIO] = CurrentBENE && data[ID] = MaxID ), [Pontos] ) )
VAR Res = SUMX ( _tbl, [Totals] )
RETURN COALESCE ( Res, 0 )Best Regards,
Alexander