Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lakwinder
Contributor III

Expression not working in KPI or Text measure

Hi Guys,

This works in a table, but do you know why it doesn't work in a KPI or Text measure?

Sum({1<PRODUCT={"xxxx"},MONTH={"201410"}>}Value_PQ)

/

Sum (total{1<PRODUCT={"xxxx"},MONTH={"201410"}>}Value_PQ)

-

Sum({1<PRODUCT={"*"},MONTH={"201410"}>}Value_PQ)

/

Sum(total{1<PRODUCT={"*"},MONTH={"201410"}>}Value_PQ)

9 Replies
MVP
MVP

Re: Expression not working in KPI or Text measure

Doesn't work because you always get 0?

maybe because

- total disregards the dimensions

- {1} disregards the selections

reddys310
Honored Contributor II

Re: Expression not working in KPI or Text measure

Hi Lak,

Is it possible to attach a sample qvf?

lakwinder
Contributor III

Re: Expression not working in KPI or Text measure

Ok, let me mock something up

lakwinder
Contributor III

Re: Expression not working in KPI or Text measure

I'm working on the server how do i save a file and get it to you

lakwinder
Contributor III

Re: Expression not working in KPI or Text measure

Sangram

I can load up pictures of the expressions for you.

Regards

pic1.pngpic2.pngPIC3.pngPIC4.pngPIC5.pngPIC6.png

lakwinder
Contributor III

Re: Expression not working in KPI or Text measure

Anyone? this expression is bugging me now  

balrajahlawat
Esteemed Contributor

Re: Expression not working in KPI or Text measure

may be this?

(Sum({<PRODUCT={"xxxx"},MONTH={"201410"}>}Value_PQ)

/

Sum (total{<PRODUCT={"xxxx"},MONTH={"201410"}>}Value_PQ))

-

(Sum({<PRODUCT={"*"},MONTH={"201410"}>}Value_PQ)

/

Sum(total{<PRODUCT={"*"},MONTH={"201410"}>}Value_PQ))

lakwinder
Contributor III

Re: Expression not working in KPI or Text measure

Nope

But thanks

reddys310
Honored Contributor II

Re: Expression not working in KPI or Text measure

Hi Lak,

In a Table, when you use the expression its grouped by the dimension values you used, but where as when you use the same expression its will return zero because its divided by the same number itself. Ex: 10/10 = 0. Though you do not use total explicitly for the numerator its considered as total as there is no dimension.

I would suggest you to analyse this by splitting the numerator and denominator into two different KPI's or text objects and see what the results are.

Community Browser