cancel
Showing results for 
Search instead for 
Did you mean: 

Use @prompt within a universe filter

shlomi_weiss2
Participant
0 Kudos

Hi all

I want to use @prompt to get user response in order to use different filters

in specific

if user selects 1 then filter last 3 month

if user selects 2 then filter last 6 month

when I try to do it in Universe i get error

Error parsing the expression: ExpressionEncoder.encodePrompt: Prompts with one argument are not implemented

. (IES 01028)

Any ideas???

Shlomi

Accepted Solutions (0)

Answers (2)

Answers (2)

michael_melters
Advisor
Advisor
0 Kudos

Please provide the SQl where part of your object. Those things are database specific. Until then: yes you can do that, but depending on your DB it must be implemented with different code. IF THEN -> MSSQL Decode -> Oracle Case when -> MSSQL, Oracle, MYSQL, DB2 ... -> ...

former_member4998
Active Contributor
0 Kudos

Hi..


for better understanding can you please give example.

and what is the back end  (DB)

shlomi_weiss2
Participant
0 Kudos

I believe that I gave an example in my first post

I work against SQL server

I want that if I give value of 1 to the promt it will filter by Last 6 months

and if I will give value of 2 it will filter by previous 6 months for example

Shlomi

michael_melters
Advisor
Advisor
0 Kudos

How have you tried? With "Case ... when ... then" , or with "if then"  Can you please paste the code?

shlomi_weiss2
Participant
0 Kudos

Hi

I've tried something like that

case @Prompt(TimePeriods)

when 1 then Calander.Cal_MTY > '2014-04'

when 2 then Calander.Cal_MTY > '2014-01'

end

Shlomi