Discussion board where members can learn more about Qlik Sense App Development and Usage.
I am beginner in Qlikview development.
In my app i wanted to join some "crosstabled" tables in order to have a specific structure.
My loaded data in a qvd file:
what I want :
What I did :
Crosstable(No, TargetDates) LOAD
Step 1 TargetDate,
Step 2 TargetDate,
Step 3 TargetDate,
Step 4 TargetDate,
Step 5 TargetDate,
Left join (DATA)
Crosstable(No, ValidateDates) LOAD
Step 1 ValidateDate,
Step 2 ValidateDate,
Step 3 ValidateDate,
Step 4 ValidateDate,
Step 5 ValidateDate,
Crosstable(No, ForecastDates) LOAD
Step 1 ForecastDate,
Step 2 ForecastDate,
Step 3 ForecastDate,
Step 4 ForecastDate,
Step 5 ForecastDate,
But after executing the script I have an error message :
Thank you for your help!
Go to Solution.
Here is a sample code for you.
Load * Inline [
No,SubField(Type,'-',1) as Step
No,SubField(Type,'-',1) as Step,Date as TargetDate
No,SubField(Type,'-',1) as Step,Date as ValidateDate
No,SubField(Type,'-',1) as Step,Date as ForecastDate
Drop Table temp;
First, did you loaded separated cross table to be sure that's are in correct format to you?
Second, Did you load all cross tables without joins?
This is awesome, thank you, i hope it will be usefull for the community.
Here is a more generic way to achieve your goal. With this kind of script, you can get your desired output without adding the script even different datetype columns will be added the source.
load distinct SubField(Type,'-',2) as datetype Resident temp;
FOR Each a in FieldValueList('datetype')
SubField(Type,'-',1) as Step,
Date as '$(a)'
drop tables temp,temp_datetype;
I loaded my data from a qvd file, and after executing the script i have the correct structure but only empty field for dates :
I have some empty field in the source file...
Do you have an idea ?
Thank you again
Very powerfull, I'll keep that in mind thks
It seems the fields don't match for left joins. If you can share a sample of your data and the script, I can look into it.
Hey kaan erisen,
it works perfectly with :
SubField(Type,'_',1) as Step
SubField(Type,'_',1) as Step,Date as TargetDate
where Type like '*Target*';
SubField(Type,'_',1) as Step,Date as ValidateDate
where Type like '*Validated*';
SubField(Type,'_',1) as Step,Date as ForecastDate
where Type like '*Forecast*';
Thank you again for your precious help