Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
test_it_1234
Contributor III
Contributor III

Set Analysis with two or more conditions in variable

Hello,

i need some help.

I  have this formular:

=count(DISTINCT {<STATUS_PRODUKT={"$(v_switch_status_produkt)"}>}Vertragsnummer)

 

STATUS_PRODUKT can be 'aktiv' or 'in Bearbeitung'

Now i can set the variable v_switch_status_produkt to 'aktiv' or  'in Bearbeitung', this works fine.

How can i set the variable to  the condition  'aktiv', 'in Bearbeitung'?

I have tryed this but it is not working.

v_switch_status_produkt=Chr(39)&'aktiv'&Chr(39)&Chr(44)&Chr(39)&'in Bearbeitung'&Chr(39)

But the output looks correct to me.('aktiv','in Bearbeitung')

 

Labels (5)
2 Solutions

Accepted Solutions
test_it_1234
Contributor III
Contributor III
Author

i find the error by my self 🙂

change this to

=count(DISTINCT {<STATUS_PRODUKT={"$(v_switch_status_produkt)"}>}Vertragsnummer)

to

=count(DISTINCT {<STATUS_PRODUKT={$(v_switch_status_produkt)}>}Vertragsnummer)

View solution in original post

tresesco
MVP
MVP

Try removing double quotes, like:

=count(DISTINCT {<STATUS_PRODUKT={$(v_switch_status_produkt)}>}Vertragsnummer)

 

Since your variable evaluation would itself have single quotes, this should work.

View solution in original post

2 Replies
test_it_1234
Contributor III
Contributor III
Author

i find the error by my self 🙂

change this to

=count(DISTINCT {<STATUS_PRODUKT={"$(v_switch_status_produkt)"}>}Vertragsnummer)

to

=count(DISTINCT {<STATUS_PRODUKT={$(v_switch_status_produkt)}>}Vertragsnummer)

tresesco
MVP
MVP

Try removing double quotes, like:

=count(DISTINCT {<STATUS_PRODUKT={$(v_switch_status_produkt)}>}Vertragsnummer)

 

Since your variable evaluation would itself have single quotes, this should work.