Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am using set analysis so that I can apply controls around the selections users make. Imagine that I have two filters [Ticket Type] and [Catalog HPE]. In this example, I want it to sum the TICKET_COUNT for [Ticket Type] = Incidents which is easy enough. But, I also need it to ignore the Catalog HPE selection - but only when Service Request is selected. If any other value (e.g. Access Control) is selected from HPE, the filter should apply like normal.
I found the following on Google. It gives me the total for Ticket Type = Incidents when nothing is selected. It gives me the Total Incidents where Catalog HPE = Access Control when I select it from the filter. However, I get 0 when I choose Service Request from Catalog HPE. I would expect it to ignore the selection and give me the same result as if no selection had been made.
({<[Ticket Type]={'Incidents'},[Catalog HPE] -= {'Service Request'}>} TICKET_COUNT)
Can anyone tell me what I am missing?
Thanks.
May be this:
If(GetFieldSelections([Catalog HPE]) = 'Service Request', Count({<[Ticket Type]={'Incidents'}, [Catalog HPE] = {'*'} - {'Service Request'}>} TICKET_COUNT), Count({<[Ticket Type]={'Incidents'}, [Catalog HPE] = p([Catalog HPE])>} TICKET_COUNT))
May be this:
If(GetFieldSelections([Catalog HPE]) = 'Service Request', Count({<[Ticket Type]={'Incidents'}, [Catalog HPE] = {'*'} - {'Service Request'}>} TICKET_COUNT), Count({<[Ticket Type]={'Incidents'}, [Catalog HPE] = p([Catalog HPE])>} TICKET_COUNT))
THANK YOU!!! I had actually started working on an IF statement after my post, but I was having trouble figuring it out. The part I was missing was GetFieldSelections([Catalog HPE]) = 'Service Request'. I was using [Catalog HPE] = 'Service Request' which I believe was checking each record for the value instead of the filter selection value.
Here is my final expression, in case you were interested:
(match(GetFieldSelections([Catalog HPE]),'Service Request','Incidents') ,
SUM({<[Ticket Type]=, [Catalog HPE]=>} TICKET_COUNT),
SUM({<[Ticket Type]=>} TICKET_COUNT))