Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

14 Replies
Mark_Little
Luminary
Luminary

Hi,

With the sample data you have shared and your set analysis it would not work.

ONLY() function is used to return a single value, i.e. when your set analysis will always return a single ID,

What exactly are you wanting returned in your table?

Is it just the ID's where type = Incident?

or something like

MAX({<Type={'Incident'}>}ID)?

Mark

martinpohl
Partner - Master
Partner - Master

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

also suppress 0-values in chart.

Anonymous
Not applicable
Author

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 🙂

shanky1907
Creator II
Creator II

Some time back i made the same mistake.... That is why i asked you what is your Dimension.

shanky1907
Creator II
Creator II

If you want to do it in Dimension you can use IF Else...

If(Type='Incident',ID)...And label it as ID