Forum Discussion
AlejandroPCar
Helper IV
7 years agoMeasure does not total and disappears values
Hi! I have a very disgusting issue here: First, the measure simply doesn't do the correct sum. The strange thing is that measure already uses SUMX. I tried several things without ...
- 7 years ago
Hi AlejandroPCar,
If 73 is the right answer, please try to wrap the MIN part with "calculate".
Actividades Adultos Inmediato 2 = VAR adult = SUMX ( VALUES ( Adult_Quindio[id_persona] ), CALCULATE ( SUM ( Jerarquia_Adult[cantidad] ), FILTER ( Jerarquia_Adult, AND ( CALCULATE ( MIN ( Adult_Quindio[annodec] ) ) >= Jerarquia_Adult[edadinicial], CALCULATE ( MIN ( Adult_Quindio[annodec] ) ) < Jerarquia_Adult[edadfinal] ) ) ) ) RETURN adult
BTW, maybe you can establish a *:* relationship to avoid a new table. But this is a suggestion based on the heavily truncated data.
Best Regards,
AlejandroPCar
Helper IV
7 years agoAmazing. Can you explain the reasson of put MIN in a CALCULATE?
v-jiascu-msft
Microsoft Employee
7 years agoHi AlejandroPCar,
Usually, calculate-function-dax is used to alter the current context. It also can convert a Row context to the Filter context in which the MIN can evaluate row by row.
Best Regards,