Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
rekha_jv
New Contributor III

Set Expression

Hi,

I am not getting results even when I use correct syntax, could any one help me please

=Only({$<Type={'Incident'}>}Id)

=Only({$<Type={"Incident"}>}Id)

Thank you in advance.

1 Solution

Accepted Solutions
rekha_jv
New Contributor III

Re: Set Expression

My mistake I was creating Dimension instead of Measure with this (=Only({$<Type={'Incident'}>}Id)) expression in a table.

Thank you for all your responses. Have a great day 🙂

14 Replies
Partner
Partner

Re: Set Expression

can you share sample app with some sample data

mdmukramali
Valued Contributor III

Re: Set Expression

Hi,

Are you trying to count the Id's where Type of the Id is Incident?

Then Try count instead of Only.

=Count({$<Type={'Incident'}>}Id)

rekha_jv
New Contributor III

Re: Set Expression

Sure. Below is the Data, I am using the expression in a table so that the table show only Incident ID and details

   

IDType
123Incident
112Request
345Change
235Incident
467Problem
123Incident
456Request
rekha_jv
New Contributor III

Re: Set Expression

Actually I don't want to aggregate the data I want to show only few records in a table so I am using Only() function.

Employee
Employee

Re: Set Expression

It does not always work that way. Use Count(DISTINCT) to validate the number datapoints included. If the result is greater than 1, Only() will return NULL for the same aggregation

mdmukramali
Valued Contributor III

Re: Set Expression

Hi,

PFA.

shanky1907
Contributor II

Re: Set Expression

What is your Dimension?

Partner
Partner

Re: Set Expression

you have to use set analysis {< Type = {'Incident'} >} in all your chart expressions.

Partner
Partner

Re: Set Expression

PFA