please, i need your help because i try to rewrite a query with the function "switch" from Microsoft Access to Qlikview.
E.g. Switch([TESTATA]![Tipo prestazione]="x";Lif(([DETTAGLIO]![codice prestazione]="yyy" or ([DETTAGLIO]![codice prestazione]="zzz";"A";"B")
Otherwise, can you suggest me alternative ways to do this (e.g. load inline table, even if i have multiple sources)?
Thanks in advance,
Mattia, did Sunny's post help you get things working? I know it has only been a couple of days, so just checking in here, if you need more time, no worries, but be sure to circle back if things work and use the Accept as Solution on Sunny's post if that did work to let others know and to give him credit for the help. If you are still stuck, leave an update and we'll see if we can find something else.
I rewrite the problem with more details because i'm new on Qlikview and the solution is not enough for my needs.
I need to rewrite some queries with the function "switch" from Microsoft Access to Qlikview, but i can have multiple sources and conditions.
Every single query matches and create a new fields, that i want to see in Qlikview.
E.g. This query should create the new field "Tipo_BDG" in Qlikview. In Access the query is the following:
Switch([TESTATA]![tipo prestazione] Like "J";"J";[TESTATA]![tipo PROGETTO] Like "K";"K";[TESTATA]![tipo prestazione] Like "S";IIf(([DETTAGLIO]![codice prestazione] Like "presta1") Or ([DETTAGLIO]![codice prestazione] Like "presta2");"SCREENING";"BDG");[TESTATA]![Regime erogazione]="7";"STRANIERI";[TESTATA]![Regime erogazione]="8";"BDG"; [TESTATA]![ASL/REGIONE] Like "0*" Or [TESTATA]![ASL/REGIONE] Like "1*" Or [TESTATA]![ASL/REGIONE] Like "2*" Or [TESTATA]![ASL/REGIONE] Like "888";"EXTRAREG"
where "TESTATA" is the name of the 1st file (source), "DETTAGLIO" is the name of the 2nd file (another source) and "tipo prestazione", "tipo progetto", "codice prestazione", "ASL/REGIONE" and "regime erogazione" are the name of the fields in the different file/sources.
So, i have three problems:
1) How can I create a new field by rewriting this query?
2) How can I rewrite the query and the if statement with multiple sources, conditions and fields involved? Can coexist in the same query in Qlikview?
3) How can I rewrite a value that begin with a certain number (in Access, e.g., I can use asterisk before the number - 0*).
Otherwise, can you suggest me alternative ways to do this (e.g. load inline table)?
Thanks Mattia, unfortunately you do not want me trying to help you with this one, I am primarily a backend guy, but I do have a place you can do some further searching that might help:
That is the base URL to the Design Blog area, many of our experts have posted hundreds of how-to type posts, hopefully you might be able to find something to help you move things forward just in case nobody else responds back. I generally start with one word in the search, see what pops up in the list and look for other/better words to use, hopefully you will be able to find some posts that will help.