Wednesday, 31 January 2024

Select multiple values in BI Report parameter dropdown

When we want to allow a BI Report parameter to take in multiple values, we need to write the where clause as below.

select * from (select 'a' col1 from dual
union
select 'b' col1 from dual
union
select 'c' col1 from dual
union
select 'd' col1 from dual
union
select 'e' col1 from dual
union
select 'f' col1 from dual
)
where 1=1
--and col1 in (:p_col1)
AND ( ( Coalesce(NULL, :p_col1) IS NULL ) OR ( col1 IN ( :p_col1) ) )













If and col1 in (:p_col1) is used then when we select All, then nothing is printed instead of all the values. 
Coalesce function returns the first non null value from its parameters

No comments:

Post a Comment