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: 
baylor2016
Creator
Creator

How to use domain value in set analysis?

Hi,

I am able to use the following syntax to get the number of patient's visit within three years before the date user selected. Now I would like to get the numbers of visits by year and month and display them in a bar chart.  The user selected date becomes year and month in the x-axis. I am sure it can be done, but I do not know how. My questions is to display the number of records three years before the date on the x-axis. 

=count(DISTINCT {$<
FLAG_DM={1},
ENCOUNTERAGE={'>17<76'},
CONTACT_DATE2 = {"$(='>=' & Date(V_selectedDate_3YearAgo) & '<=' & Date(V_selectedDate))"}
>}
PAT_ENC_CSN_ID)

Thanks

Longmatch

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

I hope you have got the right date in variable.

If yes then try below expression.

=count(DISTINCT {$<
FLAG_DM={1},
ENCOUNTERAGE={'>17<76'},
CONTACT_DATE2 = {">=$(=Date(V_selectedDate_3YearAgo))<=$(=Date(V_selectedDate))"}
>}
PAT_ENC_CSN_ID)



Regards,

Kaushik Solanki

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

I might not state my questions clearly enough. What I want is to display number of records in the past three years based upon the year month in x-axis. The variable of V_selectedDate_3YearAgo and V_selectedDate will not be used.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It would be helpful if you give sample data along with the required output.

Regards,

Kaushik Solanki

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