We can pass numeric fields as parameter combo as per the below code :
SELECT
DISTINCT brand_name AS "Brand Name",
CASE
WHEN ${param_Measure}='unit_sales' THEN sum(unit_sales)
ELSE sum(store_sales)
END AS "Sales"
FROM product p
I want to pass non-numeric(Sql Column) fields as combo parameter .Is it possible to do . Below is the code am using :
select
case when ${Dimension} = 'gender_code'
then gender_code
when ${Dimension} = 'Grade_code'
then Grade_code
end as "dimension",
sum(leave_count) as leave_count
from hcm_leave_itf_tb
group by ${Dimension}
Kindly give a solution
SELECT
DISTINCT brand_name AS "Brand Name",
CASE
WHEN ${param_Measure}='unit_sales' THEN sum(unit_sales)
ELSE sum(store_sales)
END AS "Sales"
FROM product p
I want to pass non-numeric(Sql Column) fields as combo parameter .Is it possible to do . Below is the code am using :
select
case when ${Dimension} = 'gender_code'
then gender_code
when ${Dimension} = 'Grade_code'
then Grade_code
end as "dimension",
sum(leave_count) as leave_count
from hcm_leave_itf_tb
group by ${Dimension}
Kindly give a solution