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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Displaying Associated values of a field in Text Box

Hello All,

I am having a field Country with some values and on selection of month from master calender, I want to display associated value of Country in text box?

Any function??

Regards,

Balraj Ahlawat

15 Replies
MayilVahanan

Hi

Try like this

=if(GetselectedCount(Month) > 0, Concat(Distinct Country ,','))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Good,

It works.

Now Say I got X,Y,Z as output.

I want to compare these value with X string and want to get another associated field value say Rate which holds the value 1,2,3 etc.

Should I go for Match()?

MayilVahanan

Hi,

Please explain in brief. So that we can able to help you.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

I want somthing like this:

=if(GetselectedCount(Month) > 0,


if(Match(Concat(DISTINCT Country,','),'India'),Currency_Rate),


else max of month for same value in case month not selected)


Kushal_Chawda

try

if(GetselectedCount(Month) > 0, Concat(Distinct Country&'-'& Rate ,','))

Anonymous
Not applicable
Author

Kush,

I dont want to cancatenate, I want Rate as Output for particular country.

Anonymous
Not applicable
Author

As match() return an interger value...


=if(GetselectedCount(Month) > 0,


if(Match(Concat(DISTINCT Country,','),'India')<>0, Currency_Rate),


else max of month for same value in case month not selected)

MayilVahanan

Try like this

=if(GetselectedCount(Month) > 0,

if(SubStringCount(Concat(DISTINCT Country,','),'India')=1, MaxString(Currency_Rate)),0)

If more than one associated Currency_Rate is available then Currency_Rate is display null value, in order to avoid that used Maxstring function.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MayilVahanan

Or

You can use
Only({<Country = {'India'}>}Currency_Rate)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.