Forum Discussion

LuukP's avatar
LuukP
Icon for Helper I rankHelper I
3 years ago
Solved

Table Incorrect Total - Need help with HASONEFILTER

Hi all,

 

Sorry for yet another 'Incorrect Total' message, but I haven't been able to figure this one out...

 

Here is my table visual with the incorrect total in the "Realized New Business" column:

The Realized New Business CP column sums dollar amounts in a measure for the Current Period.

The Realized New Business PP column sums dollar amounts in a measure for the Previous Period.

The logic for the Realized New Business column is 'if CP - PP < 0 then 0 otherwise CP - PP'.  Here is the actual formula:

 
Realized New Business =
var _CP = [Realized New Business CP]
var _PP = [Realized New Business PP]

return IF(
        HASONEFILTER('SLX ACCOUNT'[ACCOUNT]),
            if(_CP - _PP < 0, 0, _CP - _PP
            ),
           // THIS IS WHERE I NEED HELP
        )
Can anyone help with the part of the formula that I've bolded?
 
Thanks in advance,
 
Luuk

4 Replies