6 Replies Latest reply on Sep 9, 2016 10:19 AM by Rashmi G

# Running Sum Logic / Conditional Filters based on columns

Hi Folks - I have a requirement as follows : I need Running Sum of Participated Act column . In screenshot 1 the week id: 4851 has 296(refer second column) as the answer , but in screenshot 2 for the same week id I am getting 275. This is because it is considering only the weeks that are in the view.

Is it possible in Tableau to consider 4821 as the base week for this calculation ? Also the running sum should work if any other week ids are selected as well.

I have attached the sample excel sheet which I am using . Please let me know if this is possible.

screenshot 1

screenshot 2

Thank you,

Rashmi

• ###### 1. Re: Running Sum Logic / Conditional Filters based on columns

This looks like a case for a late filter. Instead of filtering on your week id create a new calculated field with this formula and filter on that instead:

LOOKUP(ATTR(STR([Time Week Id])),0)

This will maintain your running sum always starting from the first week id in your dataset.

• ###### 2. Re: Running Sum Logic / Conditional Filters based on columns

Hi @Andrew Watson - This helped me , thank you.

But I am unable to add the feature 'Apply to all Worksheets' . Meaning this week id selection should act like a global filter , since this is a measure this option is not appearing. Could you please help me on this.

Thank you,

Rashmi

• ###### 3. Re: Running Sum Logic / Conditional Filters based on columns

This is one of the downsides about the 'late' table calculation filters - they only apply to the worksheet they're on and can't be set to apply to other worksheets

• ###### 4. Re: Running Sum Logic / Conditional Filters based on columns

oops , Is there an alternative to 'late' table calculation filters ?

Thank you,

Rashmi

• ###### 5. Re: Running Sum Logic / Conditional Filters based on columns

I don't think so based on what you're trying to do. You want to base a running sum off the first time period and keep that running sum running total in place regardless of which time periods are filtered. Therefore the running sum needs to calculate before the filters are applied, removing some of the time periods. The only way I know to ensure the running sum calculation happens first is to use the table calculation filter.

I thought about using FIXED as this can also be made to ignore filters, but in your case I think you would need to include the time period within the FIXED statement - which means the time period filter will affect the running sum so it won't work for you.

Perhaps someone else has a different solution.

• ###### 6. Re: Running Sum Logic / Conditional Filters based on columns

Thanks Andrew , Let me wait for other replies.

Your tips did help me , I learnt something new. Thank you for that !!!