Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to filter a measure?

Hi,

I created a measure 

EBITDA = [Gross Profit]-[SGA]
 
which is derived from :
Gross Profit = 'Measure Table'[Revenue]-'Measure Table'[COR]
SGA = SUM('values'[SGA Value])
Revenue = sum('values'[Revenue Value])
 
I want to put a filter on EBITDA to exclude zero value. I tried EBITDA = filter([Gross Profit]-[SGA],EBITDA=0). But this did not work because the first argument needs a table. 
 
What DAX code should I write to exclude the EBITDA zero from matrix viz.?
  • Anonymous , I agree with parry2k  to have a visual level filter. That would most effective.

    Filter condition need a table name so you have try like

    new EBITDA = calculate([EBITDA], filter('Values',EBITDA<>0))

  • Anonymous 

    The second EBITA will also be in [] . [EBITA] <> 0

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply.

      I tried the visual filter but it did not work. Is this because EBITDA is a measure and not a column in the values table?

  • Anonymous , I agree with parry2k  to have a visual level filter. That would most effective.

    Filter condition need a table name so you have try like

    new EBITDA = calculate([EBITDA], filter('Values',EBITDA<>0))

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak  I get the following error while writing the formula. EBITDA is not a column in "values" table its a calculated measure.

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous 

        The second EBITA will also be in [] . [EBITA] <> 0