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

How to show specific values in chart

Hi All,

I`m trying to create new chart but I want to show only key models in the chart ! but on the other hand I want to give to the user the ability to select model in the filter view.

I will give an example:

When no selection has made, I want to show by default the machines models: X,Y,Z

but when the user made a T machine model , I want to show only the model  machine T.


I used the line chart:

     group field is "Time"

     Line field is "Model"

     measure is

((sum(  Aggr(sum(  distinct  [Duration]),[Machine Job])))/

($(vUtilizationTotalTime)*count( distinct  [Machine number])))

I dont want to use the function getCountSelected - it makes issues when selection made.

the only way that I can think about is Set Analysis, it works in some cases (when I applied it on the dimensions) but when the user try to select some value in model filter the selection didn`t change .


any suggestion ?

Thanks 

2 Replies
Anonymous
Not applicable

what is your issue using "getselectedcount"? you want the models X;Y;Z when no selection is done.

Maybe you may use a test for explizit naming of models?

if (match(getfieldselections,Line), 'T','other models except X;Y;Z') > 0,  

((sum(  Aggr(sum(  distinct  [Duration]),[Machine Job])))/

($(vUtilizationTotalTime)*count( distinct  [Machine number])));

((sum(  Aggr(sum(  distinct  [Duration]),Line={'X','Y','Z'},[Machine Job])))/

($(vUtilizationTotalTime)*count( distinct  [Machine number])))

kfir1987
Contributor II
Contributor II
Author

When i`m doing another selection the previews selection change for some reason.