Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Seperate Positive and Negative Average ?

Hi All,

I have a table like below

Screenshot_2.png

The Average is been Calculated based on Below formula:

Formula:

(Toady- Previous day)/Previous day

From Above table, I need an Output Like Below tables. I Need to Separate  Top  Positive(Descending Order) and  Top 10 Negative (Descending Order)Values from above table for Three Days (04/09/2017 PM,04/08/2017 PM,04/07/2017 PM)

Expected  Output:

For (04/09/2017 PM):

Positive:

TGB NameDateAverage
Metro_AMI4/9/2017 PM0.50

Negative;

TGB NameDateAverage
Bala_AMI4/9/2017 PM-0.78
Cheta_AMI4/9/2017 PM-0.85


For (04/08/2017 PM):

Positive:

TGB NameDateAverage
Bala_AMI4/8/2017 PM0.80
Metro_AMI4/8/2017 PM0.33

Negative:

TGB NameDateAverage
Cheta_AMI4/8/2017 PM-0.13

For (04/07/2017 PM):

Positive:   

TGB NameDateAverage
Cheta_AMI4/7/2017 PM1.14
Metro_AMI4/7/2017 PM1
Bala_AMI4/7/2017 PM0.25

Negative:

For 04/07/2017 PM there is no Negative Average


Please find the attached QVW and Data Excel for your reference and kindly help me out of this


Thanks

Muthu


4 Replies
Anil_Babu_Samineni

Like this?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
avinashelite

try like this

Positive :

if(sign(Expression)=1,Expression)

Negative:

if(sign(Expression)=-1,Expression)

Not applicable
Author

what table ? Can you please tell me the name Of the table?

Give me example for data.

Not applicable
Author

Kindly use formula in enable conditional formula in

Actual table +Ve:

(Toady- Previous day)/Previous day >= 0

Actual table +Ve:

(Toady- Previous day)/Previous day <= 0