Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show KPI using chart expressions?

Hi,

I have Dimension and Expressions as below

Dimension: Name

Expr1:

Count(DISTINCT {<Flag={1},Path={'Banymoore'},Station={'Posted'},MonthYear={"=$(=Date(Addmonths(Max(MonthYear),0)))"}>}ID)

Expr2:

Count(DISTINCT {<Flag={1},Path={'Banymoore'},Station={'Ready to Post'},MonthYear={"=$(=Date(Addmonths(Max(MonthYear),1)))"}>}ID)

I want to show the KPI (with smiley and sad faces). I want to show smile face when Expr1 > 100 and sad face when Expr1 <100. For second expression smile face when Expr2 >50 and sad face when Expr2 <50.

please can anyone suggest me how to do this?

Thanks.

10 Replies
rubenmarin

Hi Amelia, if your first expression is called Expr1 and you want to add an image expression with the smile you can use this expression:

If(Expr1>100,'qmem://<bundled>/BuiltIn/smiley1_g.png',

If(Expr1<100,'qmem://<bundled>/BuiltIn/smiley3_r.png', 'qmem://<bundled>/BuiltIn/smiley2_y.png'))

Set 'image' as representation.

If you want this in an object outside the chart you can replace 'Expr1' with the expression.

ramoncova06
Partner - Specialist III
Partner - Specialist III

here is one example

Not applicable
Author

Thanks. if I want to show this only for total count instead of row by row. how to do this.

please help.

rubenmarin

I suposse you want this on an text object outside the chart, for that you can use this expression:

=If(Count(DISTINCT {<Flag={1},Path={'Banymoore'},Station={'Posted'},MonthYear={"=$(=Date(Addmonths(Max(MonthYear),0)))"}>}ID)>100,'qmem://<bundled>/BuiltIn/smiley1_g.png',

If(Count(DISTINCT {<Flag={1},Path={'Banymoore'},Station={'Posted'},MonthYear={"=$(=Date(Addmonths(Max(MonthYear),0)))"}>}ID)<100,'qmem://<bundled>/BuiltIn/smiley3_r.png', 'qmem://<bundled>/BuiltIn/smiley2_y.png'))

Again, set 'Image' as representation in text object, check Ramon's example to see how it's done.

Not applicable
Author

Thanks. I need like in attached.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Have you loaded the smiley face and sad face into QlikView yet? If not please read this blog.

rubenmarin

HI Amelia, I'm not sure if that is possible, one expression has one representation and it's applied to all the rows (including Total row), in your image you have rows in text and the total is a mix of text and an image.

Hope other user gives you the solution, otherwise you'll need to look for a workaround, something similar to what Ramon posted, one expression for the value and another for the image.

Using Dimensionality() you can make it show only in Total row but all other rows will show an empty space.

Not applicable
Author

do I need to load that. sorry if this is silly question. there is already inbuilt faces are there right in qvw?

rubenmarin

Hi, yes, those faces are already loaded in QV.