Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Sum with filter selected

Hi all.

 

I have 3 cards wiht values.

 

1 - Values of month selected

2 - Values all Month

3 - I have to calculate the values until month selected.

 

1 and 2 are ok missing 3

 

ty.

  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous,

    Create measure using DAX below.

    Measure = CALCULATE(SUM(Planilha1[values]),FILTER(ALL(Planilha1),Planilha1[month]<MAX(Planilha1[month])))



    Regards,
    Lydia

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I use this

     

    AllMonths = CALCULATE(SUM(CONTABIL[VALOR])+SUM(CUSTO[VALOR_OBJ]); ALL(MES[Mes]); CUSTO[Flag] = TRUE())+0

    SelectMonth = CALCULATE(SUM(CONTABIL[VALOR])+SUM(CUSTO[VALOR_OBJ]); ALLEXCEPT(MES[Mes]); CUSTO[Flag] = TRUE())+0

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous,

    Could you please share sample data of your table and post expected result in table format?

    Regards,
    Lydia