4 Replies Latest reply on Sep 19, 2016 1:06 PM by Burak Tansug

# Calculating number of times a cell is populated

Hi,

In the attached .twbx file, 2 customers' monthly revenue is shown for 36 months in a time-series data.

What I am trying to do is to get the count of months where the customer has revenue.

The first customer (Customer ID: 0000A123) had revenue in 33 months out of 36.

The second customer (Customer ID: 0000B177) had revenue in 30 months out of 36.

So, what I am trying to do is to put these counts (33 and 30) as a separate column, next to Cust ID.

I believe this needs an LOD calculation, but I could not figure it out.

Any help is greatly appreciated.

Thanks

Burak

• ###### 1. Re: Calculating number of times a cell is populated

I did it with a table calc (using window_count.)  Create the calc.  Add it to the rows shelf.  Change the pill to DISCRETE.

1 of 1 people found this helpful
• ###### 2. Re: Calculating number of times a cell is populated

LOD way would be to create a calc like:

{fixed [Cust ID]: count(if ifnull([Revenue],0) > 0 then datepart('week', [Invoice Month]) end )}

1 of 1 people found this helpful