Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everybody.
I want to make two sheets and for every sheet I want to write an independent load script.
Need your kind support
the load script is not linked to a sheet, however you can perform a load and add a flag to it where you will indicate if this data is related to which field, then in each sheet you will filter on it's specific flag.
what do you mean exactly?
qlikview works this way:
load data to build a schema then you are free to build your charts
if you want the selections that you make on one sheet to not affect the charts on the second sheet then you have to create alternate states and build your expressions based on these states
go to Settings->Document Properties and click on Alternate States to create them
then in your set analysis you need to specify the set of data or the state that reflect your selections
Can you give a little more detail about what you want and why you want that? Well its one loadcript for a dashboard, but there are options you may use like creating different data islands (like separating the scripts) for each sheet (so they don't link). You can also you alternate states so selections in one sheet don't affect another. Or you can add in some triggers to clear selections between sheets.
Hope this helps!
Actually I have two separate Dashboards and for each I have different load script. I want to bring them into one sheet but with no link inbetween so that means for Sheet A i will change a specific load script and for sheet B I will use the other loadscript
Well thats a case of making sure they don't have any fields in common. So it's going through and looking at the fields and changing them if need be. A function that may help when going through would be the Qualify and Unqualify statements (look in the qlikview help). Essentially they will append the table name to each of the fields inside the table like:
Qualify *;
Table1:
Load Name
Resident Table2;
Unqualify *;
So this will make the field Name have the name Table1.Name.
Hope this helps!
I totally did not got your point. Can you please explain a bit.
i think that you need to think again in your data model, if the two dashboards are not related to each other and don't have anything in common, they should not be merged.
however to solve your issue, let's consider that you have two QVDs A.QVD and B.QVD each one for a specific sheet and they might or might not have anything in common.
let's consider your main table name is transactions.
Transactions:
LOAD *, 'Sheet1' as Flag from A.QVD
Concatenate(Transaction)
Load *, 'Sheet2' as Flag from B.QVD
now you have loaded both qvds in your data model each one with a different load. in your design when it comes to the first sheet you need to filter on Flag = 'Sheet1' you can do that by adding it as a filter on all your expressions {<Flag='Sheet1'>} or set it in the sheet action, and if you go with this approach you need to make sure that the Flag field is hidden so that the user will not be able to remove it when clearing the selections.
do the same for sheet2, and also if they are completely different which means that the filter applied in sheet1 should not be reflected in sheet2 then add another sheet action on leave event to clear all selection.
If you want them in one dashboard, then you'll have to merge the scripts together.
My point is, if you have in your script A fields like Project, Name, Owner, Cost and then you have in your script B fields like Project, Name, Owner, Revenue, then when you put the scripts together, Qlikview will try to link Project, Name, Owner between your script A and script B and create synthetic keys. But you won't want those to link. So for one you'll have to change the name so the link doesnt happen. So in script B, if you change the fields to B.Project, B.Name, B. Owner, B.Revenue, then those synthetic keys won't be created and the link won't be there. But if there are no fields that are the same between the two, then no link will be created. Just merge the two scripts into one and use that.
Hope this helps!
Keep in mind that if you deploy a qvw like that on a server, it won't work with document licenses.