Forum Discussion
JB_AT
Helper III
1 year agoReturn 0 when blank
Hello I would like to return 0 instead of blank(). I tried following the instructions here https://www.sqlbi.com/articles/how-to-return-0-instead-of-blank-in-dax/ and other variations, but th...
- 1 year ago
Hi,
I tried to create a sample pbix file like below.
Please check [Entry measure fix:] measure in the below picture and the attached pbix file.
Entry measure fix: = VAR _periodstart = CALCULATE ( MIN ( 'fact'[date] ), REMOVEFILTERS ( 'calendar' ) ) VAR _periodend = CALCULATE ( MAX ( 'fact'[date] ), REMOVEFILTERS ( 'calendar' ) ) VAR _result = CALCULATE ( COUNTROWS ( VALUES ( 'fact'[department_id] ) ), 'fact'[valid_entry] = 1 ) RETURN IF ( MAX ( 'calendar'[Date] ) >= _periodstart && MIN ( 'calendar'[Date] ) <= _periodend, _result + 0 )