Forum Discussion
GunnerJ
4 years agoPost Patron
calculate function is changing measure action
I'm needing to flag pending accounts when the value for an account's 'total as of date' is less than 1 and where the 'Action Flag' is "PENDING". 'Total as of date' returns the 'RUNNING_TOTAL' value o...
- 4 years ago
This code worked. I just had to switch the action flag piece. Making it equal to a value made the measure key in on specific rows. Saying NOT "STOP" let it look at the account as a whole.
Pending_Accounts = CALCULATE( Countx( Filter( Values('TEST CHARGES'[BI_ACCT]), [total as of date] < 1 ) , [BI_ACCT] ), 'TEST CHARGES'[ACTION_FLAG] <> "STOP" )
AlexisOlson
4 years agoSuper User
Without the "PENDING" filter, the measure [total as of date] returns 2. With that filter, the [total as of date] measure inside of the [Pending_Accounts] measure returns 0 since the last "PENDING" date had RUNNING_TOTAL = 0.
Try writing this measure to understand what's happening to [total as of date] inside of [Pending_Accounts] when you add the filter:
CALCULATE ( [total as of date], 'TEST CHARGES'[ACTION_FLAG] = "PENDING" )