If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Trouble sorting a calculated column

Started by wzewald, 01 Sep 2016 12:36:42 PM

Previous topic - Next topic

wzewald

I am trying to sort a column that is the result of a calculation. I have a column with ticketnumbers and a column with usernames. The numbers are unique but the users are not so I want to have a count of the number of tickets per user. If I have the column with the users first and then the ticketnumbers, I can group on the users. The I add a count to the ticketnumbers column and then it the amount of times they appear.

-------- --------
user1   | 3
-------- --------
user2   | 5

My problem is that I am unable to sort the second column. I want the highest number up top but the sorting has no effect at all. I am baffled. I can write a query in SQL that should work in a normal SQL app but here it just gives me lot's of syntax errors. I am stuck....

By the way: I am new to the program. Love the possibilities!

Francis aka khayman

shouldn't you be sorting the first column based on the second column?

hespora

#2
I think your problem is the grouping. If you just want the count of unique ticket numbers, you shouldn't have to group:

From an empty report,

1. drag in your user
2. drag in your ticket number
3. modify the ticket number to count(distinct [ticketno] for [user])
4. sort ticket number descending

/edit: or, if you absolutely have to have the grouping, do what khayman said: Go into Grouping and Sorting for your list and move ticket number from nested in detail sort list to nested in groups>[user]>sort list

wzewald

Quote from: hespora on 02 Sep 2016 02:46:27 AM
I think your problem is the grouping. If you just want the count of unique ticket numbers, you shouldn't have to group:

From an empty report,

1. drag in your user
2. drag in your ticket number
3. modify the ticket number to count(distinct [ticketno] for [user])
4. sort ticket number descending

/edit: or, if you absolutely have to have the grouping, do what khayman said: Go into Grouping and Sorting for your list and move ticket number from nested in detail sort list to nested in groups>[user]>sort list

This absolutely helped me! The expression worked like a charm! Sorting works too now!!

hespora