Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mohan_1105
Contributor III

How to find the common field name for two selection?

Hello Qliker,

I am trying to display the common drug used in two different type of treatment in the bar chart having a measure how many physician prescribed the drug.

I know it can be achieved by p() function. I gonna use this function for the first time and I'm not getting it correct.

I have field Treatment category and Drug prescribed when the user what to know the drugs prescribed in common based on the treatment category selection user has made in filter pane.

Thanks and regards,

Mohan

Tags (1)
4 Replies
MVP
MVP

Re: How to find the common field name for two selection?

Hi, not clear from your description.. Can you provide exactly what you are looking for in the expression?

mohan_1105
Contributor III

Re: How to find the common field name for two selection?

Hi,

Like,

Count(distinct {<[Treatment Catergory]=p({"GetFieldSelections([Treatment Category])"})>}Physician_ID)

mohan_1105
Contributor III

Re: How to find the common field name for two selection?

Hi Manish,

I guess you could understand what I'm looking for from the expression I just replied. Kindly let me know in case it requires more explanation.

Regards,

Mohan

MVP
MVP

Re: How to find the common field name for two selection?

Simply try this and let me know

Count({<[Treatment Catergory] = P([Treatment Catergory])>}Distinct Physician_ID)

Community Browser