Quantcast
Channel: Pentaho Community Forums - BI Platform
Viewing all articles
Browse latest Browse all 2893

Non-numeric sql fields as parameter combo

$
0
0
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



Viewing all articles
Browse latest Browse all 2893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>