Jump to content

Adding reference column on a table


Joyce

Recommended Posts

Hi,

I am trying to create a report, which provide counts on customer division (which is in one of the custom field). This division comes in different ways (from our AD), but one division, might have more than one 'Customer Division'. For example, PLC Division might cover (health& safety, HR, etc).

So I want a column, in h_itsm_request which says If (left(custom_field,13)='Health&safety','PLC',(if(left(custom_field,2)='HR','PLC',))

Then I can use this column, to count the number for 'PLC'

At the moment, i get separate counts, ie: Health&Safety = 5 and then HR = 10.  So i have to manually add them up .

 

Or please advise alternative way to do this, in a bar chart widget

Thanks.

Regards,

Joyce

Link to comment
Share on other sites

Guest AlexC

Hi Joice,

You may possible use a count case statement, for example :

COUNT(CASE WHEN withinfix=0 THEN 1 END)

The if statement used may not provide you with the the desired result, It may be helpful to provide some sample data that goes in to that custom field so we may get a better understanding .

Thanks,

Alex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...