Skip to Content
author's profile photo Former Member
Former Member

WEBI Running Count Distinct

Hi,

I need to calculate YTD count distinct by time. My data is

date id

1/1/2015 1

1/1/2015 2

1/2/2015 1

1/2/2015 3

and the report is:

date # of id # of id YTD =[date] =count([id];distinct) ???

I've tried several versions of =Count([id] Where ([id] dynamic condition);Distinct) ForAll([id]), but with no luck (Dynamic condition is going to extend the scope incrementally)

I'd much appreciate any advise on this.

Thanks,

Michal

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 13, 2015 at 02:00 PM

    Hi Michal,

    Try

    =RunningSum( Count ([id]) ) for "# of id YTD"

    and check.

    Regards,

    Yuvraj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Michael,

      I think that the following formula will fulfill your requirement.

      =RunningSum(Sum(If ( ([Id] ForEach([Id];[date]) In ([Id];[date]) = Previous([Id] ForEach ([Id];[date]) )) In ([Id];[date]);0;1) ) )

      Regards,

      Rogerio

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2015 at 08:40 AM

    Hi,

    I'm sorry but didn't understand your questionar.

    Can you clarify it a little bit more?

    Perhaps with a sample?

    Regards,

    Rogerio

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      =RunningCount([ID]) in ([ID]) will give you a result that is half way there when you include ID in your table - you'll see that the last value for each Year-Month is the number that you want. I'm struggling to figure out how to translate that into something without the ID in the table. Not sure if it's anywhere near a solution for you but it could be a start.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.