Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summation Issue

Status
Not open for further replies.

syncdba

IS-IT--Management
Nov 28, 2005
206
US
Hi all,
Not sure if its possible. I have created a report in CRXI from text file. The report shows:
Date Count of users
05/11/2007 2
05/12/2007 12
Weekly count 14
05/13/2007 4
05/14/2007 7

I got the count of users as summary/{Distinct count of "users"} group by date "daily" from users column.
I have created another group on Date column grouped by "weekly". I need to find the sum of distinct users on weekly basis. When I tried summary/{Distinct count of users group by weekly} it is giving wrong number..
Any help.
How can I add the daily Distinctcount to get the sum of user by week?

Thanks in advance.
 
I can't use this formula coz it gives distinct count of users per week but I want distinct count of users per day and then SUM them per week.
 
There is no such thing as a sum of users.

Sums are for numerics.

Create 2 groups,one by day, one by week.

Use a regular insert->summary->distinctcount for the daily.

Then use the formula I gave you for the weekly.

If you need to sum the daily formula, which will produce the wrong results (not an accurate distinctcount for a week), create a formula to accumulate the dailies:

weekly groupheader:
whileprintingrecords;
numbervar DisWeekly:=0

Daily groupfooter
whileprintingrecords;
numbervar DisWeekly:= DisWeekly + distinctcount({table.users},{table.date})

Weeklygroupfooter(display):
whileprintingrecords;
numbervar DisWeekly

-k

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top