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
offjunior
Creator
Creator

Try it!

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

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

       )

    )

Not applicable
Author

Hi,

In generally i need:

If SpalteA = 'ä' and SpalteB = 2 or

If SpalteA = 'b' and SpalteB = 1 or

If SpalteA = 'c' and SpalteB= 1 or

if .......or

if.......

then show 'Tabelle zeigt nichts' in Textbox else 'Tabelle zeigt Text'

If I use two If Statements it will work If I try to add a third it's not working

Thanks Thomas

swuehl
MVP
MVP

If (                                                             // condition

     ( SpalteA = 'ä' and SpalteB = 2)

                or

      (SpalteA = 'b' and SpalteB = 1)

                or

     (SpalteA = 'c' and SpalteB= 1)

,'Tabelle zeigt nichts'                                    // then

,'Tabelle zeigt Text'                                        // else

)

offjunior
Creator
Creator

Try it:

Create two variables, each of them with the text you want to display, then assign the rule in the text box I'm sending you.

Attached hereto a document qvw bout what you need working.

= MaxString(If((SpalteA = 'a' and  SpalteB = 2) or (SpalteA = 'b' and  SpalteB = 1) or (SpalteA = 'c' and  SpalteB = 1), vTextThen, vTextElse))

or

= MaxString(If((SpalteA = 'a' and  SpalteB = 2) or (SpalteA = 'b' and  SpalteB = 1) or (SpalteA = 'c' and  SpalteB = 1), 'Tabelle zeigt nichts', 'Tabelle zeigt Text'))

Hug!

Not applicable
Author

Hallo,

thanks for answer.

Beispieln3.bmp

Beispieln4.bmp

offjunior
Creator
Creator

= MaxString(If((SpalteA = 'a' and  SpalteB = 2) or (SpalteA = 'b' and  SpalteB = 1) or (SpalteA = 'c' and  SpalteB = 1), 'Tabelle zeigt nichts', 'Tabelle zeigt Text'))

Not applicable
Author

Hello,

next try,

Beispieln5.bmp

Not applicable
Author

Hello,

sorry I can't see any attechment. The extended Editor doesn't working.

Thanks Thomas

offjunior
Creator
Creator

Try it:


= MaxString(If((SpalteA = 'a' and  SpalteB = 2) or (SpalteA = 'b' and  SpalteB = 1) or (SpalteA = 'c' and  SpalteB = 1), 'Tabelle zeigt nichts', 'Tabelle zeigt Text'))

Not applicable
Author

Hello,

It seems to work, Thanks a lot. Could I ask you something else.

Could you please have look at following Discusion: Higlight a tap (Worksheet) accroding to a condition

Is it possible to do it in the same way?


Thanks Thomas