Forum Discussion

AlejandroPCar's avatar
AlejandroPCar
Icon for Helper IV rankHelper IV
7 years ago
Solved

Measure 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 ...
  • v-jiascu-msft's avatar
    v-jiascu-msft
    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
    

    Measure-does-not-total-and-disappears-values2

     

    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,