Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

About the expression GetFieldSelections

 

Hello guys, I'm new to qlikview.

On my straight table chart, I would like to show only the items which selected as an output item.

(Selected in the listbox -> Reflected to the Straight table)

I used "GetField Selections" expression for the dimentions of straight table, but it doesn't work properly.

As the following screenshot, when I select an item "Unit Cost", an item "Cost" also displayed in the straight table due to t a part of item name is same.

*Enable Consitional:

=GetFieldSelections([Output items],',',110)like '*Cost*'

=GetFieldSelections([Output items],',',110)like '*Unit Cost*'

キャプチャ.PNG

 

Is it possible to distinguish between "Cost" and "Unit Cost"?

Thank you for your support!

2 Solutions

Accepted Solutions
Highlighted
Creator
Creator

Re: About the expression GetFieldSelections

For me this sounds as Adhoc, Hence you can simply

=SubStringCount('|' & Concat(distinct [Output Items], '|') & '|', '|Cost|')

 

View solution in original post

Highlighted
Partner
Partner

Re: About the expression GetFieldSelections

I have not used you approach my self, but is it not possible to do like this?

=GetFieldSelections([Output items],',',110) = 'Cost'

If it is not then the solution below should give you your desired result.

SubStringCount( Concat( DISTINCT '|' & [Output items] & '|'), '|Cost|')
AND
GetSelectedCount ([Output items]) > 0
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

5 Replies
Highlighted
Creator
Creator

Re: About the expression GetFieldSelections

Not really sure - What you tried and trying here? Perhaps this

If([Output items]='Cost', 1,0)

Highlighted
Contributor III
Contributor III

Re: About the expression GetFieldSelections

Hello @saminea_ANZ !

Thank you for your suppot!

I would like to select multiple items as the output items... so I cannot use expression "=".

Highlighted
Creator
Creator

Re: About the expression GetFieldSelections

For me this sounds as Adhoc, Hence you can simply

=SubStringCount('|' & Concat(distinct [Output Items], '|') & '|', '|Cost|')

 

View solution in original post

Highlighted
Partner
Partner

Re: About the expression GetFieldSelections

I have not used you approach my self, but is it not possible to do like this?

=GetFieldSelections([Output items],',',110) = 'Cost'

If it is not then the solution below should give you your desired result.

SubStringCount( Concat( DISTINCT '|' & [Output items] & '|'), '|Cost|')
AND
GetSelectedCount ([Output items]) > 0
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted
Contributor III
Contributor III

Re: About the expression GetFieldSelections

@saminea_ANZ , @Vegar 

It went well! Thank you for your perfect answer!!!