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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit value in pivot table according to variable?

Dear All,

I have read many topic related to limit value, however, there is no precise answer for my case.

I attach the qlik file for easier view.

Please help

Many thanks

Dong

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Dong,

Create a variable called vRDL_Dim with this expression:

=If(vRSL='All','>-9999',vRSL)

Change batch dim with a calculated dim with this expression:

=IF(([Expiry Date]-vDate)/30$(vRSL_Dim), Batch)

Select Suppress When Value Is Null on this dimension.

Regards!!

View solution in original post

4 Replies
Anil_Babu_Samineni

What do you mean Limit Value, Can i know more input issues from your end, Bcz i don't have license

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

Hi Dong,

Create a variable called vRDL_Dim with this expression:

=If(vRSL='All','>-9999',vRSL)

Change batch dim with a calculated dim with this expression:

=IF(([Expiry Date]-vDate)/30$(vRSL_Dim), Batch)

Select Suppress When Value Is Null on this dimension.

Regards!!

Not applicable
Author

I have 3 dimensions: description, Batch, Expiry Date; and 3 expressions are RSL, RSL text, Qty where:

* RSL = ([Expiry Date]-vDate)/30 (vDate is variable which value is given by Calendar object)

* RSL text = if(RSL<=6,'<=6',if(RSL<=9,'<=9',if(RSL<=12,'<=12','>12')))

* Qty = sum([Stock Total])

vRSL is variable which has value from input box. It is constrained by listed value with formula =Concat(DISTINCT Shelflife,',')

And Shelflife is create by below scripts

LOAD * INLINE [
Shelflife
All
>12
<=12
<=9
<=6
]
;

And in "Show value" under RSL text expression, I put the formula  [RSL text]=vRSL

but it doesn't work when I choose any value in input box whether it is <=6, <=9, <=12, >12, or All.

The idea is that the pivot table will show only records matching between RSL text and Shelflife

   

DescriptionBatchExpiry DateRSLRSL textQty
Product A5SF372/1/20173.7<=60
Product A5SF432/1/20173.7<=67
Product A5SJ275/1/20176.7<=92129
Product A5SK616/1/20177.7<=90
Product A5SN138/1/20179.7<=120
Product A5SV249/1/201710.8<=120
Product A5SV259/1/201710.8<=120
Product A5SV4510/1/201711.8<=120
Product A6S08812/1/201713.8>123973
Product A6S7792/1/201815.9>1234065
Product A6S8002/1/201815.9>1237613
Product A6S9403/1/201816.8>12118069
Product A6S9953/1/201816.8>1224554
Not applicable
Author

Thanks so much