Forum Discussion
Anonymous
2 years agoNot applicable
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...
- 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
Greg_Deckler
2 years agoCommunity Champion
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
__ResultAnonymous
2 years agoNot applicable
Brilliant, thank you so much! THis was exactly it. I just updated to >= to capture zeros and it's exactly what I needed. I really appreciate the help, this is amazing!