Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Set

Please find the attachment

I have created a new field form the existing data base

On the dashboard you can see that ther are many text object in which i have used set analysis

Which keeps changing when i make a selections on  DRUGRESULT  and gives the exact data.

But i want the text object to display the value according the selection of the listbox DRGRSLT.

Thanks Sunny

Your exprssion works for all the chart single and as well as multiple selection ,

But the main text object which has count( distinct PTNUMBER ) is not giving thr appropriate result .

1 Solution

Accepted Solutions
sunny_talwar

Try this expression for the main text object may be:

=Sum(Aggr(Count(DISTINCT PTNUMBER), DRGRSLT))

View solution in original post

14 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Just use

=count(DISTINCT PTNUMBER)

Which will change the values as per the selection.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
swuehl
MVP
MVP

Maybe you want to clear selection in DRUGRESULT:

=count(DISTINCT {$<DRGRSLT={'Sensitivity'},DRUGRESULT=>}PTNUMBER)

sunny_talwar

Can you elaborate a little more on what exactly are you trying to do?

MayilVahanan

Hi

Try like this

=count({<DRUGRESULT=>}DISTINCT PTNUMBER)

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

OK in the dashboard  ther many text object which need to display the distinct count of patient number depebding on the selection made in the filter DRGRSLT .

Ther is one more text object which will have count(Distinct PTNUMBER)  which will give the total of seleted value .

For example i select Sensitivyt ans resisnatnt in the DRGRSLT  the other object should be zero and in the sum of this total shoul  shown in the text object Count(Distinct PTNUMBER) .

I hope iam clear now

smilingjohn
Specialist
Specialist
Author

This someting for over text object , I want to show the value for each DRUGRESULT thats why iam using set analysis and passing single value , and it has to change as per the selection made in the DRGRSLT 

sunny_talwar

For making everything else = 0, you can add this condition to all your text box objects:

=If(GetSelectedCount(DRGRSLT) = 0, YourExpression)

If you want to completely hide the text box then you can use the same condition on the layout tab

GetSelectedCount(DRGRSLT) = 0

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this for each and every text box.

=if(DRGRSLT ='Sensitivity',  count(DISTINCT {$<DRGRSLT={'Sensitivity'}>}PTNUMBER),0)

=if(DRGRSLT ='Intermediate',  count(DISTINCT {$<DRGRSLT={'Intermediate'}>}PTNUMBER),0)


and other just like this...

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
smilingjohn
Specialist
Specialist
Author

Thanks Sunny


I want to show the value for each DRUGRESULT thats why iam using set analysis and passing single value , and it has to change as per the selection made in the DRGRSLT .

In my attached file whenever i make selection in the filter DRGRSLT  its not changing the value in text box .

PLease find my QVW attachment