Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Slider not working for limit >= 1000

Hello Dears,

I have a flag on my tablebox with the below code to trigger the slider:

fabs(
Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0')>= Num#(v_IC_Prod_Min_Value,'# ##0.0') and Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0', '.')<= Num#(v_IC_Prod_Max_Value,'# ##0.0', '.')
)

I don't know maybe its the function  Num#(v_IC_Prod_Max_Value,'# ##0.0', '.')

the slider works well for values between 0 to 999. But does not work when the max value exceeds 999, that is for values >= 1000

DO you have any idea please how to correct?

THanks in advance

15 Replies
Anonymous
Not applicable
Author

Hi Ashley,

Could you share a screenshot plz?

Regards!

Not applicable
Author

   

Formula for Total IC (Inventory coverage) in Table box:

 

((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT)))

 

 

Flag to show items in table box based on Flag:

 

fabs(
Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0')>= Num#(v_IC_Prod_Min_Value,'# ##0.0')

 

and

 

Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0')<= Num#(v_IC_Prod_Max_Value,'# ##0.0')
)

 

 

Min Value of slider and Min Value of input box: both contain lower limit variable v_IC_Prod_Min_Value

 

Max Value of slider and Max Value of input box: both contain upper limit variable v_IC_Prod_Max_Value

 

Anonymous
Not applicable
Author

Hi Ashley,

This may work, I think there is a problem on calculating values. Could you share an example of your app?

Regards!

Not applicable
Author

Unfortunately I've asked but i cant share the app due to corp data in it. please feel free to ask any query regarding the settings..

I share the settings for the Total IC formula:

Anonymous
Not applicable
Author

Ok, no problem.

Follow this steps:

  1. Your slide may be from 0 to 1001
  2. Create a Straight table chart
  3. Insert as dimensions your product view dimensions
  4. Don't restrict any dimension within slide conditions
  5. Insert this expresions:
    1. Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK)/ Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT)
    2. Num#(v_IC_Prod_Max_Value,'# ##0.0')
    3. Num#(v_IC_Prod_Min_Value,'# ##0.0')
    4. Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0')
    5. Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0')>= Num#(v_IC_Prod_Min_Value,'# ##0.0')
    6. Num#(if(IsNull(((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))=-1, 0, (((Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK))/ (Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT))))),'# ##0.0')<= Num#(v_IC_Prod_Max_Value,'# ##0.0')


What results do you get?

Regards!!!

jonathandienst
Partner - Champion III
Partner - Champion III

The Num#() function reads a string value and interprets as a number. Your slider variables should already be numbers, so Num#() will either fail or add no useful value, and this could be why values >= 1000 do not work.

I assume that you want your expression to return 1 if the conditions are satisfied and 0 if not. Then the expression can be simplified to:

fabs(

    if(

        Alt(Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK)

          / Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT), 0) >= v_IC_Prod_Min_Value

    And

        Alt(Sum({$<Pivot_Item_Type={'SUBST'}>} QTY_STOCK)

          / Sum({$<Pivot_Item_Type={'SUBST'}>} DAILY_AVG_CURRENT_WEEK_OUT), 0) <= v_IC_Prod_Max_Value

     )

)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Jonathan I've tried the code but after replacing the Num#

functions with Alt functions, the Total IC values > 1000 no longer appear in my table box when they should be appearing

Not applicable
Author

THanks Manuel for your suggestions.. I have tried your codes and please find the resuts below:

With default values on load of document:

After I have moved the sliders with min value = 8 and max value = 1100, slider no longer works for vaues of max >= 1000:

As in screenshot, the item names become blank and 0, that is the slider is not able to filter values greater than 1000

After I have moved the sliders with min value = 8 and max value = 860, slider works well for vaues of max < 1000:

As in screenshot, I have some item names listed which fall within the range of values 8 to 860

Anonymous
Not applicable
Author

Hi Ashley,

Your issue is on yellow, on last expression. Could you show all header of this expression to see it plz?

With values 0 - 1097.6

Regards!!