Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
Using a small sample in-line file consisting of "Patients" and Doctors" I would like to produce a Pivot Chart wherein a Patient is being displayed only if being seen by more than one Doctor. I believe this might have something to do with the Calculation Condition as available from the General Tab but I have been unable to get this to work. If this is 'not the way to go' and there is a better/simpler solution, I would appreciate the feedback. I have attached the result I am getting along with the PatientDoctorCounts.qvw being used.
I am using the QV Desktop product so I cannot view changes/additions that might be suggested to the provided .qvw
Thanks very much
Dave
try
- replacing the dimension PatientName with
=if(aggr(count(distinct DoctorName), PatientName)>1, PatientName)
- and check Suppress when value is null
try
- replacing the dimension PatientName with
=if(aggr(count(distinct DoctorName), PatientName)>1, PatientName)
- and check Suppress when value is null
I just made a conditional expression. as the above reply states, just ensure 'suppress missing' is enabled on the presentation tab.
if(count(distinct DoctorName)> vNumDoctors,count(DISTINCT DoctorName))
ps: i also variablized the number of doctors so that a user can select the threshold of doctor visits that a patient has seen .
let us know if it helps.
Hi Massimo:
Thanks for your help. It works perfectly.
David
Hi Jonathan:
I am unable to read your amended .qvw as I only have the Desktop Version of QV. When I add your 'conditional expression' as given - if(count(distinct DoctorName)> vNumDoctors,count(DISTINCT DoctorName)), the vNumDoctors portion is underlined in red. I am assuming that there is something else I have to do and that you may have provided this in the amended .qvw. If you could give me any further explanation on how to activate the ability to "select" the threshold I would appreciate it.
Thanks
Dave
Sure - quickest way to show this example would be to add an input box to your app. Create a new variable in the input box properties and call it vNumDoctors. On the Constraints tab i selected 'predefined values only', 'predefined values in dropdown' and under predefined values i selected a number series from 0 to 10 with a step of 1. Then when a user changes the drop down from 0 to 1 to 2 etc... the chart filters based on the threshold. let me know if this helps