
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ListBox Expression
I have an expression =Count(DAYS_PENDING) for a stragiht table with dimensions Division, Region and PendingBucket.
I would like to create a list box that represents the straight table above, into two categories. Assigned vs UnAssigned. If count is greater then 1 Unassigned, else Assigned.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to create a Case Statement in my Script to solve the problem.
CASE
WHEN A.FIRST_ASSGN_DT IS NOT NULL
THEN 'Assigned'
WHEN A.FIRST_CONTACT_DT IS NOT NULL THEN 'Assigned'
WHEN A.FIRST_VISIT_DT IS NOT NULL THEN 'Assigned'
ELSE 'UnAssigned'
END Assigned


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey there,
Do you have a sample qvw that you can share, so that we can make you a solution for your issue?
Regards,
MB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try This
If(Count(DAYS_PENDING) > 1,'Unassigned', 'assigned')
OR
If(Len(Count(DAYS_PENDING)) > 1,'Unassigned', 'assigned')


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi John,
As a first attempt create a listbox with this expression:
=Aggr(If(count(DAYS_PENDING) >1,'Assigned','Unassigned'), FieldName)
The thing to figure out here is the Fieldname to choose, try it on the dimension with the finest granularity.
I think there might be a bit of work to be done on the logic behind your requirements before we can get a solution.
Good luck
Andrew

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This would create the two buckets for you, but will not work well based on selections
Aggr(If(Count(DAYS_PENDING) > 1, 'Unassigned', 'Assigned'), Division, Region and PendingBucket)
Can you do the count in the script to create the flag for unassigned and assigned?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to create a Case Statement in my Script to solve the problem.
CASE
WHEN A.FIRST_ASSGN_DT IS NOT NULL
THEN 'Assigned'
WHEN A.FIRST_CONTACT_DT IS NOT NULL THEN 'Assigned'
WHEN A.FIRST_VISIT_DT IS NOT NULL THEN 'Assigned'
ELSE 'UnAssigned'
END Assigned
