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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique Count

Status
Not open for further replies.

JoaoPinto

Programmer
Feb 12, 2003
26
US
Is there anyway to count unique instances?

Other than doing

DEFINE FILE WEEK1
COUNTNUM/I9 = IF LAST ROLOC NE ROLOC THEN 1 ELSE 0;
END

And summing COUNTNUM?
 

Use DST. prefix operator, e.g.:

TABLE FILE MOVIES
COUNT DST.CATEGORY
END

Grzegorz
 
Thanks a lot. Is there anyway to add a label to that?
eg.
COUNT DST.CATEGORY AS 'My Label is this'

The above doesn't seem to work?
 

Probably a typo - it works for me:

TABLE FILE MOVIES
COUNT DST.CATEGORY AS 'My Label is this'
END
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top