If you are unable to create a new account, please email support@bspsoftware.com

 

Multi select value prompt - Pass multiple values on single selection

Started by bwalikar, 20 Feb 2020 03:47:22 AM

Previous topic - Next topic

bwalikar

Hi all,

I have got this requirement where 'Week' number is used as multi select check box prompt. Requirement is to fetch 2 weeks of data for any selection.

Example :
Prompt Display value
Week 1 & Week 2
Week 2 & Week 3
Week 3 & Week 4 

If option 1 and 2 are selected I would like to get the data for Week 1,2, 3. similarly if option 1 and 3 are selected I would like to get data for 1,2,3,4. Any suggestions in this regard is appreciated !



Francis aka khayman

do you already have an approach in mind? or you need us to give you information how to solve this?

also, if first option was selected, does it mean you need two weeks data starting from today?

are those all the prompt? you only need 4 weeks of data?

do you have a week column in your date dimension? or you plan to calculate weeks from a date column?

are you using dimensional or relational source?

bwalikar

do you already have an approach in mind? or you need us to give you information how to solve this? : I have tried out an approach which is working only if the prompt is changed to single select. So any suggestion I will try out.
[Week] in (?ParamWeek? , ?ParamWeek?+1)


also, if first option was selected, does it mean you need two weeks data starting from today? I have a week column in the date dimension. So filtering is required based on the week column.

are those all the prompt? you only need 4 weeks of data? I have put sample data out there. Prompt would have all the values till 53 weeks

do you have a week column in your date dimension? or you plan to calculate weeks from a date column? We have a week column in date dimension

are you using dimensional or relational source? : Relational

seb24c

Assuming that the prompt use value is the first week of the two weeks displayed, you could add a data item to your query: c_PrevWeek: [Week] - 1

Then the detail filter would be: [Week] in ?p_Week? or [c_PrevWeek] in ?p_Week?

Andrei I

Quote[Week] in (?ParamWeek? , ?ParamWeek?+1)

As seb24c suggested

Assuming:






Prompt DisplayPrompt Value
Week 1 & Week 21
Week 2 & Week 32
Week 3 & Week 43

Try this:
[Week] in ?ParamWeek? OR [Week]-1 in ?ParamWeek?



bwalikar

Awesome ! Thanks seb24c and Andrei I. It works like a charm.

Francis aka khayman

good that its working.

just curious you did say that your prompt is multi select check box prompt right?
how about if you selected more than one value? does it still work right?

or did you changed your prompt to single select?