title: OBIEE 12C: use of presentation variables
body: <p>I have a question concerning the use of presentation variables:</p>
  
  <p>1) What's the correct syntax for filtering on a presentation variable is used? You allow a user to select multiple values in a filter eg. A and B. If you use the syntax = '@{PV}{%}' it will result in this sql: = 'A, B' which of course won't exist in the data. I'd like to have this result: in ('A', 'B').
  I've already found this syntax: (@{PV}['@']) which gives the correct sql, only thing here is that this doesn't work when you have a dashboard prompt where you allow 'all column values'. When no value is passed to this presentation variable, the analysis throws an error. I have no idea how to put a default value in this one. Any ideas on this?  </p>
  
  <p>2) Is there any configuration or setting where you can push obi to use a presentation variable in stead of using the 'normal' way of filtering as shown here: <a href="https://i.stack.imgur.com/8DyOs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8DyOs.png" alt="Filter"></a></p>
  
  <p>The obi way is that it changes the relation to the relation in the prompt (if the prompt says 'is greater than' it will change here as well, even though you've put here 'is equal to'), but it will also use a value for this dimension if there's ever been a value for this, rather than listening to the value in the presentation variable of the dashboard prompt. I know that you can translate this to SQL but that's not the way to go for me. The behaviour I'd like is (in this exact order): 
  - when there is a value in the presentation variable in the dashboard prompt, take this.
  - when there is a value for this role of the dimension, take that. </p>
  
  <p>The reason why is because we have this dimension 'Afdeling' which can take up many roles but our customer asked for the roles to be hidden from the end user. This means that even though you switch roles, the end user always sees 'Afdeling' and couldn't care less in which role it is looking at its 'Afdeling'. They can switch between different dashboard pages and if I'd put on top of the page the dashboardprompt of the 'Afdeling' in the role it needed to be, the value won't pass through when switching pages to another dashboardprompt of another role. That way the end user would know something was up. So the value needs to pass through the prompt on each page, no matter what the role of that dimension.</p>
  
  <p>After a bit of googling I've found the answer to question 1 myself. Thanks to this website <a href="https://www.obieetips.com/2014/05/obiee-11g-using-multiple-value-for.html" rel="nofollow noreferrer">https://www.obieetips.com/2014/05/obiee-11g-using-multiple-value-for.html</a> I now know that the correct syntax is (@{pv_region}['@']{'West '})</p>