×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

returning the latest (max) value into a crosstab

returning the latest (max) value into a crosstab

returning the latest (max) value into a crosstab

(OP)
Hi there,

I have a table that records a clients support level, this can change during the course of their treatment between medium low or High

attached is a sample of data

client_id_______priority_level_________priority_startdate________priorty_enddate
1234__________medium_____________01/02/2017____________23/04/2017
1234__________low_________________23/04/2017___________18/08/2017
1234__________medium_____________21/08/2017____________

or

client_id_______priority_level_________priority_startdate_______priorty_enddate
4321__________high_______________18/11/2017____________13/02/2018
4321__________medium____________14/02/2018____________16/08/2018
4321__________low________________16/08/2018____________21/10/2018


What I'd like to do is produce a summary report that shows the number of clients by priority level, any ideas how i can do this?









RE: returning the latest (max) value into a crosstab

I would think you would just need three running totals that each would evaluate on a given priority level.

RE: returning the latest (max) value into a crosstab

(OP)
Thanks for replying,

not sure how i would get that to work?!

RE: returning the latest (max) value into a crosstab

For the running total, do a distinctcount of client ID, evaluate based on a formula, e.g., for the “Low” priority:

{table.startdate}=Maximum({table.startdate},{table.clientID}) and
{table.priority}=“Low”

Reset never.

Repeat for each priority level, just changing the priority type. Place the running totals in the report footer. This assumes you have a group on clientID.

-LB

RE: returning the latest (max) value into a crosstab

I see in the title that you want this in a crosstab. I do not work with crosstabs very much (it has been years since I needed to). So lbass should be able to assist you better than myself.

RE: returning the latest (max) value into a crosstab

(OP)
lbass solution did the trick, many thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close