Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago

Create measure filter

I need to create a measure that makes a calculation by there a filter I do, for example, calculate (sum (table [column]); table [column that will suffer the filter]) in my case would be the year filter

5 Replies

  • Sean's avatar
    Sean
    Community Champion

    Anonymous If you are going to use a Slicer or Filter - why add the filter in the Formula as well?

     

    Can you explain better?

    • Anonymous's avatar
      Anonymous
      Not applicable

      SeanGreg_Deckler

       

      For the filter to determine a value for a single object, which will be using this measure,

      for example: I have a graph and want their values to be displayed only when a filter is done year

       

      some would like this: Sum ({$ <Year = {'<= $ (= Only (Year))'}, Month =>} Vl Rest processed)

      • Sean's avatar
        Sean
        Community Champion

        I don't get this. But you can always hard code the filter like this for example

         

        2015 Total = CALCULATE (SUM(Table[Column]), CalendarTable[Year]=2015)

         

        If you want to do Year to Date = TOTALYTD(SUM(Table[Column]), CalendarTable[Date])