Qlik Community

Ask a Question

QlikView Documents

QlikView documentation and resources.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY

How to - Dynamic Look and Feel

robert_mika

How to - Dynamic Look and Feel


How to - Dynamic Look and Feel

The concept here is to have colors and logo dynamically changed based on a listbox.

Steps:

1)

Download attached package and saved included picture to a folder.

2)

Create new application and copy and paste below code:

Company:

load * inline [

PickName,Company,val

pepsilogo.jpg,Pepsi,1

cokelogo.jpg,Coke,2

catlogo.jpg,Cat,3

]

;

Colors:

load * inline [

No.,      Pepsi,    Coke,Cat,Variable Name,Info

1, 'RGB(232,17,45)','RGB(184,19,33)','RGB(0,0,0)',vTabActiveBg,Active Backround

2, 'RGB(0, 133, 202)','RGB(51,11,12)','RGB(255,223,0)',vTabInactiveBg,Incative Background

]

;

T1:

load  * inline [

Product,Value,Country

A,1,Russia

B,2,UK

C,3,Poland

D,4,Germany

E,5,Czech

]

;

pics:

bundle load * Inline

[

PickName,Path

pepsilogo.jpg,'D:\Multilanguages\pepsilogo.jpg'

cokelogo.jpg,'D:\Multilanguages\cokelogo.jpg'

catlogo.jpg,'D:\Multilanguages\catlogo.jpg'

]

3)

Change this part

'D:\Multilanguages\catlogo.jpg'


to  a path with a folder with your pictures.

Reload.

4)

Create:

a) List box -  with field "Company"

b) Bar chart -- with "Product" as Dimension

                        and SUM(Values) as Expression


c) Text box-

with Representation as "Image"

and below expression in Text box:

=if(Company=Company,Info(PickName),'NA')

Capture.PNG

5)

Add 3 variables:

Capture.PNG

a) vTabActiveBg

      =$(=fieldvalue($(vCompany),1))

b) vTabInativeBg

  =$(=fieldvalue($(vCompany),2))

c) vCompany

      =Chr(39)&Company&Chr(39)



6)

In the Caption section of an object change the Base Color of " Active " and "Inactive Colors" to

"Calculated" with an expression

for "Inactive Caption" use:

=vTabInactiveBg


For "Active Caption"

=vTabActiveBg

Capture.PNG


The final picture will be similar to this one


Capture.PNG

Now you can use  the list box to change the colors and the logo of the company.

As you probably realize at this point, you can add  more variables to have every other color dynamically change this way.

Feeling Qlikngry?

How To /Missing Manual(23 articles)

Attachments
Comments
vikasmahajan
Champion
Champion

Thanks for Sharing

gautik92
Specialist III
Specialist III

Good one Thanks for sharing

manojkulkarni
Partner
Partner

good one

fmazzarelli
Partner
Partner

Hi,

I tried to replicate what you did but I have difficulty in using Qlik sense  when you write

c) Text box-

with Representation as "Image"

and below expression in Text box:

=if(Company=Company,Info(PickName),'NA')

and

6)

In the Caption section of an object change the Base Color of " Active " and "Inactive Colors" to

"Calculated" with an expression

for "Inactive Caption" use:

=vTabInactiveBg


For "Active Caption"

=vTabActiveBg


My result is ... the image attached

Immagine.png

0 Likes
robert_mika

Could you attached your app?

0 Likes
fmazzarelli
Partner
Partner

I am ashamed but I do not know how to do

0 Likes
travelindata
Contributor II
Contributor II

Thanks for sharing, I've never used the function Info() like this. I have to say an open mind is indispensable when we work with Qlik.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2015-12-01 04:09 PM
Updated by: