Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Removing negative values for a table visual

I'm working on a project where I have calculated a figure between two base values. The results are in the left table and you can see some values are positive and some negative. My next step is...
  • Greg_Deckler's avatar
    2 years ago

    Anonymous I *think* you are going for this:

    Measure =
      VAR __Table = 
        ADDCOLUMNS(
          'Dupes Removed',
          "__Diff", DATEDIFF('Dupes Removed'[Field 1], 'Dupes Removed'[Field 2], day)
        )
      VAR __Result = AVERAGEX( FILTER( __Table, [__Diff] > 0 ), [__Diff] )
    RETURN
      __Result