Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Showing boolean data as a check box or similar

Hi

Is there a way I can show a text value "True" as a text value "Y" or as an Icon or as a Checkbox.

I've tried the SQL case statement but the feed SQL doesn't like it and I've tried the column formatting and it doesn't allow.

Any other possibilities

Thanks

John

9 Replies
Not applicable
Author

if(data='Y',True,False)

Not applicable
Author

as an expression in a checkbox

Not applicable
Author

Sorry my question was not that well phrased, I wanted a check box or similar int a table view so instead of "True" or "False" in the columns it showed it graphically or simpler as "Y" or "N" ... in some I'd like to show nothing if false and a geen box / dot if true, or similar.

Not applicable
Author

I don't know if I understand your question but:

you can use the tab on properties graphic "layout": inside you can put a condition

Not applicable
Author

Hi John,

I think you should create an expression (eg in a straight table) with Display Option = "Image" (tab Presentation) and code it similar to this:

if(sum(Value) >=50, 'qmem://<bundled>/BuiltIn/led_g.png',
if(sum(Value) >=25, 'qmem://<bundled>/BuiltIn/led_y.png',
if(sum(Value) >= 10, 'qmem://<bundled>/BuiltIn/led_r.png'
)
)
)


Note: Build In Images like above can be found in the Image-Tab of the expression editor.

Regards, Roland

Not applicable
Author

Hi

Thanks for your help

As you may guess I'm new to QV - I'm using the Table Box object

Trying to locate where the display options are. I've located Advanced on the presentation tab which seems to be a suitable location but it doesn't allow teh If(,,) statement, Number with format pattern, but it does nothing with the If Statement and there is no image,

I want an column Available to show green when it is true (Text 'TRUE'). (I'll mess with the pics later - found that ok thanks)

if

John

(Available = "TRUE",'Y', '')



Not applicable
Author

Hi John,

a table box is like a view onto the fields you added. No calculation or representation can be done. So try to use for your purpose a chart --> choose straight table. See my little app, there you will find a exam straight table. Sorry, my describtion in my post above wasn't correct, here once again: see properties --> Expressions --> choose expression "example" --> Representation" is Image and see for the definition of the expression input field. AND --> Enjoy QV!

RR

Not applicable
Author

Thanks Roland

Nearly there, but its pushing the formula not the result to the table column.

e.g. if(Hob='TRUE', ... led_g.png, ... led.png )

Getting

I think i'm looking for a checkbox somewhere to say 'Use Icon'

John

Not applicable
Author

Found it thanks

Formatting on the expression to 'Image' and then change the 'Display Option' to 'Image' set the aspect ratio and wait a bit while it saves.

Lovely