Forum Discussion
bsheffer
Continued Contributor
5 years agoIs there a recursive way to get sequential counts? attempt 2
Is there a recursive way to get sequential counts? 2 hours ago for each account I'm counting the number of consecutive months that they have a status of seasonal but they can't have any other...
VahidDM
Super User
5 years agoHi bsheffer
I think you can create variables and use them in calculation code rather than the filter , something like this:
Var _Filter =
filter(all('Dim Calendar ActivityMonth'), [_ACTUALS RELATIVE MONTH FLAG] = 1)
beside, you can use SWITCH code.
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos!!
- bsheffer5 years ago
Continued Contributor
Not sure how this would help me. I'm testing for failure and when it succeeds (meaning that the month is good) I move to the next month. Replacing pieces of code with up to 32 filter variables might make the code shorter but I don't see how this improves the logic.