I am trying to create a new report with a filter based on another query. For instance I have a bunch of fields and want to add this type of filter: if place code = '22' then provider state = 'PA' else no filter.
I have tried writing to separate queries; I've tried some case if, case when scenarios that all fail when testing the code.
case when ([place_code] = '22' then [provider_state] = 'PA' ) end
There is just too many results if I don't put in this filter. I ultimately need all place_code's and the respective provider_states but when it's place_code 22 I only want to see provider_state's of 'PA'