Comment ajouter une image dans un tableau dans Qlikview ?

0
3272
qlikview ajouter une image dans un tableau
qlikview ajouter une image dans un tableau

Example Syntax:

[TableName]: 
Bundle  
Load
*
From
[Datasource].xls;

Similar to a mapping table, two fields are loaded into the data model: 
1.) An ID or KEY field linking the image to the dimension in the data model
2.) The file path where the image resides, identified by the KEY field

Here is an example based on the requirement above to associate a country with its flag:

The images are saved in another folder which QlikView will read into the data based upon the specific file path. In the below example, an absolute path is being used but in order to remain portable, you can also use a relative folder path.

Bundle 2.png

After the script reloads, the images are available within the Edit Expression dialog box, under the Images tab. We can now reference the image we want to see by using the INFO function and the KEY field.

Bundle 3.png
Bundle 4.png

Scenario 2: Loading Images Unassociated to Data Field Values:

In this scenario, the image may be referenced from the interface using a specific syntax:
qmem://< fieldname> / <fieldvalue> 

 Similar to the first scenario, you first load in the reference file that contains the image name and the location of the image.

Bundle 5.png
Bundle 6.png

Upon reloading, the images are accessible within the QlikView application. These images can be referenced in expressions by changing the representation of the expression to Image. Remember, we want the image to display based upon meeting certain criteria of an expression result (think Visual Cues, but with images).

Bundle 7.png

Next , use the syntax stated above within the expression syntax. Based upon the results of the expression, an image will display (e.g. +Sales Growth% and a green up arrow; -Sales Growth % and a red down arrow). When the images are loaded into QlikView, they become accessible through the Images tab on the bottom right of the Edit Expression dialogue box, just like in Scenario 1.

Bundle 8.png

The result is shown below. Note in our above expression, the green square will display if Sales are greater than $3M, otherwise it will be a red circle. Sweden has sales less than $3M so the red circle is displayed whereas the United States has sales of $5M so the green square is displayed.

Bundle 9.png

Examples Source: http://community.qlikview.com/blogs/qlikviewdesignblog/2013/09/13/replacing-images-with-geometric-shapes-as-visual-clues

LEAVE A REPLY

Please enter your comment!
Please enter your name here