isempty
1 TopicConditional CALCULATE based on if a table ISEMPTY
I'm trying to create a measure that conditionally picks what type of filter to used based on if the results of one filter returns an empty table. This measure feeds a line chart. The DAX is below. The problem I'm having is this: If the ISEMPTY() evalutes to TRUE, only metric2 values are graphed, but if ISEMPTY() evaluates to FALSE, BOTH metric1 and metric2 values are graphed. I'm still investigating, but can you see anything wrong with the DAX? Thanks! Out = IF( ISEMPTY( CALCULATETABLE( 'table', 'table'[metric] = "metric1" ) ), CALCULATE( SUM('table'[score]), FILTER('table', 'table'[metric] = "metric2") ), CALCULATE( SUM('table'[score]), FILTER('table', 'table'[metric] = "metric1") ) )1.2KViews0likes2Comments