Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rammuthiah
Contributor II

Show negative counts in KPI

I have today's and yesterdays data. If I subtract today's sales with yesterdays data (i.e : for ID 1: 200-300 -> -100, So I need to show the negative count of ID). Showing result perfectly for each row. I need the negative count in KPI.

Tags (1)
5 Replies
beck110979
Valued Contributor III

Re: Show negative counts in KPI

Hi Ram,

look at this:Fabs ‒ QlikView

and this:

https://www.youtube.com/watch?v=K7nO70behkg

i hope that helps

Beck

rammuthiah
Contributor II

Re: Show negative counts in KPI

I need the count of ID which shows the negative value. In this case no. of count is 1, since the ID : 1 has negative value.

agigliotti
Honored Contributor II

Re: Show negative counts in KPI

please attach a printscreen and the expected result.

pathiqvd
Contributor III

Re: Show negative counts in KPI

Hi ram,

     I think do like this, In script level write like this,

LOAD ID,

          Sal1,

          Sal 2,

          Sal1-Sal2 as Sal 

     from tablename;

after write condition in KPI:- count(if(Sal<=0,ID))  you will get answer.

Regards,

rammuthiah
Contributor II

Re: Show negative counts in KPI

Now, it's working