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: 
nareshthavidishetty
Creator III
Creator III

dynamic Expression

Hi all ,

I got a requirement like there are process and Quality check

process       Quality check threshold will be

x                      98%

y                      98%

z                      95%

a                       95%

b                       95%

c                       98%

so I'm showing that in straight table these things   now my question is

if I select process x,or y or c it should show 98% dynamically

and if I select z it should show 95%

how can I achieve this

I can write a condition in expression(background color)    if it is only 98% but here it is changing to 98 or 95

17 Replies
nareshthavidishetty
Creator III
Creator III
Author

I got like 24 or 25 process and I cannot wrte for each process as it should be dynamic might be client changes that threshold value to 99% or 100% in the future so it should be dynamic

all I want is depending on the process that percentages should be shown but here there are not constant ,

when calculating the Quality% values may be 98% or 99% or 95%

I want to shown color coding depending on the process level like for X process it is 98% if it goes to 97.5% or what ever less it is red in color

like that for other process threshold value is 95% and if it goes less I want to show red in color

Anil_Babu_Samineni

If your expression good, And if you want to % as well while hit filtering you may try this.

And you mentioned the % is not showing after selection, Does this you are referring?

1) You can use % Symbol from Number Format

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
nareshthavidishetty
Creator III
Creator III
Author

I got like 24 or 25 process process and I'm calculating Quality % what I have provided above , based on client they provided some threshold values like 98% or 99% for processes

now if I select process X and its threshold value is 98% or greater than 98% it should  show green or else red if values are less than 98% like that for some other process it is 95% it should show red or green if it goes below or above how can I achieve this in straight table or any other

jyothish8807
Master II
Master II

Hi Naresh,

Try like this:

in Background color. You can write nested if for all process or you can write pick match.

If(Process='X' and

sum({<Activity={Quality Check},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}No_Of_Items)-(sum({<Activity={External error},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}No_Of_Items)))

/

sum({1<Activity={Quality Check},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}total No_Of_Items) <98%,red(),green())

Br,

KC

Best Regards,
KC
jyothish8807
Master II
Master II

to make it more easy, make a inline table with process and threshold value.

process       Threshhold

x                      98%

y                      98%

z                      95%

a                       95%

b                       95%

c                       98%

Now in background expression:

if(

sum({<Activity={Quality Check},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}No_Of_Items)-(sum({<Activity={External error},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}No_Of_Items)))

/

sum({1<Activity={Quality Check},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}total No_Of_Items) <Threshhold,red(),green())

Br,

KC

Best Regards,
KC
nareshthavidishetty
Creator III
Creator III
Author

not working

jyothish8807
Master II
Master II

Make suer the 'Process field' inline table and "Process Field" used in chart have an association in data model.

Attached an sample.

Regards

KC

Best Regards,
KC
nareshthavidishetty
Creator III
Creator III
Author

this is not what I'm looking i calculated the quality percentage in the straight table by below formula

sum({<Activity={Quality Check},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}No_Of_Items)-(sum({<Activity={External error},Year={$(vCurrYear)},Month={$(vCurrMonth)}>}No_Of_Items)))/sum({<Activity={Quality Check},Year={$(vCurrYear)},Month={$(vCurrMonth)}>} No_Of_Items)

for the calculation Quality%

and formula  is correct for the Quality% I'm jus showing quality% in straight table by using this formula,now my question color coding depending on the process,  I'm showing red ,green colors accordingly because value is only 1 here that is 99%  (threshold value) so i written a condition in express backgrd <0.99

in some cases it is only 0.95 or 95% for some process in 24 processes,

so how can i achieve when that changes