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: 
Anonymous
Not applicable

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
maxgro
MVP
MVP

Doesn't work because you always get 0?

maybe because

- total disregards the dimensions

- {1} disregards the selections

reddy-s
Master II
Master II

Hi Lak,

Is it possible to attach a sample qvf?

Anonymous
Not applicable
Author

Ok, let me mock something up

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

Sangram

I can load up pictures of the expressions for you.

Regards

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

Anonymous
Not applicable
Author

Anyone? this expression is bugging me now  

Anonymous
Not applicable
Author

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))

Anonymous
Not applicable
Author

Nope

But thanks

reddy-s
Master II
Master II

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.