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: 
anitamanders
Contributor II
Contributor II

formula in pivottable based on subtotal

Hello,

hope one of you can help me with this

I have a pivot table with

articlecode          current stock          sales/month

1341012S               `18                              43

                                                                      28

                                                                      41

         subtotal                                            112

What i want is that current stock turns red if the average sales for 3 months (when you select 3 months) is more than current stock

so: sum(sales)/3 > stock  than RED

I have enclosed my document

Example code 1341012S

Current stock =18

avv. for month july/aug/sept = 37,3333  (=112/3)

stock should turn red, but it isn't

when you only select month june (where sales is >18) than it is working, so it seems my formula only looks at the sales and not at subtotal sales

Can someone help me??

Thanks

13 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Can you upload ur file?

anitamanders
Contributor II
Contributor II
Author

I have added a file in my original post

Daniele added this with my first question

When you select code 7194000 you can see stock = null

and box should turn red, but stays green

MayilVahanan

HI

Please check the attached file.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
anitamanders
Contributor II
Contributor II
Author

super! thanks

I added the Alt in the wrong place, but this works!

thanks