Forum Discussion

PowerWhy's avatar
PowerWhy
Helper IV
3 years ago

SIGN function behaviour changing when in an if function?

Hi All,

 

Please can someone suggest why these 2 measures may display different results? (I'm getting 1 for "Test Measure 1" and 0 for "Test Mesaure 2". I think both measures should output the same number (i.e. "sign([Net Production])" )

 

From sense checking the source data I think the result should be 0.

 

Test Measure 1 =
            calculate(if([Output] <> 0, sign([Net Production]), sign([Net Production])),
                ALL('Dim_Calendar'[Fiscal Period]),
                ALL('Dim_Calendar'[Fiscal Quarter])
            )
 
Test Measure 2 =
            calculate(sign([Net Production]),
                ALL('Dim_Calendar'[Fiscal Period]),
                ALL('Dim_Calendar'[Fiscal Quarter])
            )
 
Thank you for any help,
 
PW

1 Reply

  • This does seem strange. Can you share a file that reproduces this issue?