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

Creating Textbox according to if statement (condition)

Hello together,

I need some help. It is very easy to create a Textbox using a if Condition to display text.

But it only works if I select a Value.

Textbox condition:

=if(columnA='example',(if(columnB>1,'TEST')))

This wokrs fine if I select emaple wtihin the tabelchart (diagram).

Is it posible to get a result within the Textbox without a selection using if statement (condition)?

Thanks Thomas

31 Replies
Not applicable
Author

Hi,

please have a look on my Example. In this example you will see some tablecharts.Both tablecharts have some condtions to highlight value. The second tablechart in additon has a formula. The result is, that I only get rows according to a condition.  This functions work fine.

What I need is in additoin a Textbox if the condition for TableChart: Beispiel Anzeigen / Ausblenden is false. No rows will displayed. So the user willl be informed that he don't have to expect rows / vales.

Thanks Thomas

swuehl
MVP
MVP

So maybe like:

=if(Sum(If(SpalteA='a' and SpalteB>= 2,SpalteB)), 'Tabelle zeigt was', 'Tabelle zeigt nichts')

Not applicable
Author

Hi,

thanks for your answer. I tried this, because I have more than one condition:

=concat(If(SpalteA='a',If(SpalteB>= 2,'Tabelle zeigt was'),

(If(SpalteA='c',If(SpalteB= 1,'Tabelle zeigt was'),'Tabelle zeigt nichts'))))

you will see I chaned the values in SpalteB for a test. Now it works. The last problem I have is that he shows 'Tabelle zeigt nichts' twice times. On which position do I have to do that within the statement

Beispieln2.bmp

Thanks Thomas

Not applicable
Author

Hi,

your Statement is working too. I trie to do that with two conditions

Thanks Thomas

swuehl
MVP
MVP

Thomas Walldorf wrote:

. The last problem I have is that he shows 'Tabelle zeigt nichts' twice times. On which position do I have to do that within the statement

Use DISTINCT qualifier:

=concat(DISTINCT If(SpalteA='a',If(SpalteB>= 2,'Tabelle zeigt was'),

(If(SpalteA='c',If(SpalteB= 1,'Tabelle zeigt was'),'Tabelle zeigt nichts'))))

offjunior
Creator
Creator

Good day friend!

I can help you, but need you to be more clear and specific about what you need. First things first, I've downloaded your files qvw, which the first step which you wish to make in that file? Answer me that and I'll be here to help you.

Reminding me explain very well what you want.

Hugs.

Not applicable
Author

hi,

thanks a lot Junior Junior.

See the picture above.

In the Texbox I have included:

=concat(If(SpalteA='a',If(SpalteB>= 2,'Tabelle zeigt was'),

(If(SpalteA='c',If(SpalteB= 1,'Tabelle zeigt was'),'Tabelle zeigt nichts'))))

If you can see I get several times a solution (text)

What I need is to display some text if tablechart Beispiel Anzeigen / Ausblenden is empty.

Thanks Thomas

Not applicable
Author

Hi Junior Juniior,

because it won't really work I tried this one within Textbox:

if(Sum(If(SpalteA='a' and SpalteB>= 2,SpalteB)),

If(SpalteA='a' and SpalteB>= 2,SpalteB),'Tabelle zeigt nichts')

This works but only if I have maximum two conditions If I try to add a third If Statement it won't work.

Thanks Thomas

Not applicable
Author

Hi Junior Junior

Sorry I did a mistake:

Now the correct Statement

if(Sum(If(SpalteA='a' and SpalteB= 2,SpalteB)),

If(SpalteA='c' and SpalteB= 1,SpalteB),'Tabelle zeigt nichts')

This works but only if I have maximum two conditions If I try to add a third If Statement it won't work.

Thanks Thomas

offjunior
Creator
Creator

Please give me a complete sentence with the third condition you are saying it does not work.