Forum Discussion

marsclone's avatar
marsclone
Helper IV
6 years ago

Measure not affected by filter

Hello,

 

I have a measure that calculates the correct value, but i do not want to change that value if a filter is selected.

Which adjustments do i have to make in this measure?

 

Bedrag % = DIVIDE(SUM('OP Lijsten'[Bedrag]), CALCULATE(SUM('OP Lijsten'[Bedrag]) , ALLSELECTED('OP Lijsten')))
 
Thank you in advance
Marcel

9 Replies

  • ALL() is used to remove filters. So replace Allselected with ALL.

    • marsclone's avatar
      marsclone
      Helper IV

      Problem is that i have certain filters on page level. I want to keep them. 
      in this measure the filter on "vervaltermijn" must not affect the outcome. 

      • parry2k's avatar
        parry2k
        Super User

        marsclone 

        ALL( Table[vervaltermijn]) 

         

        not sure how your tables are related and what not.

         

         

         

         

  • marsclone change ALLSELECTED to ALL

     

    I would ā¤ Kudos if my solution helped. šŸ‘‰ If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    ⚔Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚔

  • Hi everyone, has anyone had the opposite happen to you? Measures that are not affected by filters? I review the interactions and they are not disabled. The calculation expressions appear to be correct.

    MEASURE 1:

    Delta_Acum_vsAƱoPasado_Personas = [Acum_real_AƱoActual_Personas]/[Acum_real_AƱoPasado_Personas]-1
    and use the following:
    MEASURE 2:
    Acum_real_AƱoActual_Personas =
    CALCULATE(
    [Real_Personas_a_hoy_V],
    'Calendar'[Date]<=TODAY()-1,
    'Calendar'[AƱoActual]="Current Year"
    )
    MEASURE 3:
    Acum_real_AƱoPasado_Personas =
    WHERE Current_date_LY = DATE(YEAR(TODAY())-1, MONTH(TODAY()),DAY(TODAY()-1))
    WHERE Star_year_LY = DATE(YEAR(TODAY())-1, MONTH(12),DAY(2))
    RETURN
    CALCULATE(SUM(BD2[VISITORS]),
    'Calendar'[Date] < Current_date_LY,
    'Calendar'[Date] >= Star_year_LY
    )
    I appreciate your help.