Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to count the number of occurrences of a name within a week in a year
I tried something like that:
=COUNT( DISTINCT <WeekNumberOfTheYear> Name)
But it doesn't work.
Can anyone help me, please?
Thanks.
N.
try this:
create week number in calendar of your app.
Count({<WeekNo = {'$(=Max(WeekNo))'}, Date=, Day= >} Distinct Name)
Hi
Distinct is in the wrong place;
=COUNT(<WeekNumberOfTheYear> DISTINCT Name)
HTH
Jonathan
PS = this is ignoring selections in a field called [WeekNumberOfTheYear]
Dear Edp,
Try below Script
Test:
Laod Date,
Name
from Datasource;
Test1:
Load Week(Date) as WeekNo,
year(Date) as Year,
Count(Distinct Name) as NameCount
resident Test
Group by WeekNo, Year;
Drop table Test;
Regards
Kiran
Hi Kiran,
I need the function in the chart, not in the script.
Thank you.
N.
Hi Jonathan,
I switched as you explained, but it's doesn't work again (the result is an '-').
Thank you.
N.
Hi,
I tried as you explained (I calculated WeekNo As Year*100+Week, so I have 201401, 201402 and so on...), but the result is always 0.
Thank you.
N.
You can create a Straight Table with
WeekNumber as Dimension
and
Count (Distinct Name) as Expression.
Please elaborate your requirement.
What is the dimension u r using? and in what type of chart?
u want to count the number of occurance of a particular name in a partucular week of a year or in all weeks of the year?
Try to post a sample data and expected output.
-Sundar
Hi
As we are all just guessing at the problem now, it would be a good idea to post your qvw with some sample data so that can be looked at in more detail.
Jonathan