Skip to main content
Solved

Reset cumulation on blank?

  • October 13, 2025
  • 1 reply
  • 69 views

Forum|alt.badge.img+7

I have an integer dimension by month, vendor, and function that has “1” if that vendor was employed in that specific month. How can I cumulate but reset if the employment is blank? I.e. some vendors are employed for 3 cumulative months, then take a 7 month break, and come back for 2 months so I would want the respective values to show 3 cumulated and then 2 cumulated. Thank you!

Best answer by Laszlo

Hi ​@ljanowski,

 

Instead of CUMULATE() you can utilize the PREVIOUS() function.

Combined with an IF statement you can check for blank cells, and reset the cumulated value.

 

IF ( ISDEFINED ('Vendor Employed') ,PREVIOUS(Month)+'Vendor Employed', BLANK)

The first line in the below table is simulating your input metric.

 

1 reply

Laszlo
Helper
Forum|alt.badge.img+6
  • Helper
  • 23 replies
  • Answer
  • October 13, 2025

Hi ​@ljanowski,

 

Instead of CUMULATE() you can utilize the PREVIOUS() function.

Combined with an IF statement you can check for blank cells, and reset the cumulated value.

 

IF ( ISDEFINED ('Vendor Employed') ,PREVIOUS(Month)+'Vendor Employed', BLANK)

The first line in the below table is simulating your input metric.