Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
lalita_sharma
Contributor III
Contributor III

Set expression in text box

I have a text box where I have an expression as below

=ONLY({$<Date = {'$(vDate_Current)'}, [KPI name] = {2}, [Workstream Id] = {6}>}Headline)

As the above expression has a $ in beginning of set expression I would expect it to override the set expression selections  when any selections are made on the filter pane on [Workstream Id], Date or [KPI name]. But the value displayed in the text box doesn't change even if I make any selections on the filter pane.

 

when I change the expression in the text box as below and make a selection on the filter pane like select a different [Workstream Id] from filter pane, the text box becomes blank:

=AGGR(ONLY({$<Date = {'$(vDate_Current)'}, [KPI name] = {2}, [Workstream Id] = {6}>}Headline),Headline, Date, [KPI name] , [Workstream Id])

I want the text box to display value of headline as per the selection in set expression when no selections are made on the filter pane, and change the values as per the selections made on the filter pane.

Please help

 

Thanks

Lalita

2 Solutions

Accepted Solutions
tresesco
MVP
MVP

If you mean - 'IF there is no selection then your set expression ELSE as per selection' then you could try something like:

If(Len(GetCurrentSelection()), Headline, <your expression>)

View solution in original post

anthonyj
Creator III
Creator III

Hi Lalita,

The $ expression at the beginning does allow interaction of the filters with the set expression however it won't override a set expression. If you have '2' and '6' for your KPI name and Workstream ID in your set expression then these values are locked in and it won't interact with those columns filters.

If you want your measure to interact with the filter you'll have to remove these from the set expression but then you'll have to set them manually or set up your app with these values pre-selected on opening.

I hope this makes sense

Regards

Anthony

View solution in original post

4 Replies
tresesco
MVP
MVP

If you mean - 'IF there is no selection then your set expression ELSE as per selection' then you could try something like:

If(Len(GetCurrentSelection()), Headline, <your expression>)

anthonyj
Creator III
Creator III

Hi Lalita,

The $ expression at the beginning does allow interaction of the filters with the set expression however it won't override a set expression. If you have '2' and '6' for your KPI name and Workstream ID in your set expression then these values are locked in and it won't interact with those columns filters.

If you want your measure to interact with the filter you'll have to remove these from the set expression but then you'll have to set them manually or set up your app with these values pre-selected on opening.

I hope this makes sense

Regards

Anthony

lalita_sharma
Contributor III
Contributor III
Author

Thanks @tresesco 

This worked perfect for me.

lalita_sharma
Contributor III
Contributor III
Author

Thanks for explaining @anthonyj 

This helped me clear the concept.