- Connect to a data source which contains this data.
- On the data source page, if you are connected to a relational database you get the Custom SQL option.
- Click the option and enter the query.
Hope this helps.
Ok...I'll try, but I would like to use the above query on a complete datasource that just I've.
The only way I can think of is to create parameter and compare that parameter values with PatientId, but i don't think this is feasible in a real life case since,
we'd have to create multiple parameters by the number of distinct patient ID of diagnosis A
and parameter values are not dynamic - meaning, everytime we update the data, we should update the parameter.
Also, i would suggest to move PatientID to dimension field.
IIF(([PatientId]=[param_A1] or [PatientId]=[param_A2] or [PatientId]=[param_A3]) and [Diagnosis]<>'A',[ID-Diag],null)
i will try to think of a smarter way
I don't think this way work in my this case... I've had thousand patient and many hundred diagnosis type's.
I need a trick that works automatically, fixed an objective diagnosis (ex. A)
Thanks in advance