Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I would like to develop a script which converts the rows into columns dynamically
Since the data is huge the Cross Table is not the optimized way and the Customer don't want the same thing in the layout by Pivot.
Attaching a sample data and the kind of output needed for your kind reference.
Kindly help
Thanks & Regards
Jeba
This should give you an idea of how to do pivot in script dynamically:
You could use Left Join un the table filtered by the row value you need as column ....
Jebamalai Dass wrote:
Since the data is huge the Cross Table is not the optimized way
Have you tested this assertion? The cross table operation converts the data into a proper fact table that will perform better than the original cross table and will greatly simplify the dimensions and expressions in the front end.
While you could achieve this manually, I very much doubt that what you do will outperform the QV crosstable function.
Hi Alessandro,
All the fields are in the same qvd.
Does this mean we need to load twice and left join?
Regards
Jeba
Hi Jonathan,
Thanks for the guidance,
I tried that but it took huge time and was not responding
Thanks & Regards
Jeba
Not twice but as many times as the different values you need as column (you can use a loop after you tested for a column)
Hi Alessandro,
Is there any examples you can share with me?
Regards
Jeba
I think jontydkpi is right. In addition to them it might be helpful to split the crosstable-loadings in cases that there isn't enough RAM (it shouldn't be swapped into the virtual RAM) and/or to use incremental loads. Here you find various links to them: Advanced topics for creating a qlik datamodel
- Marcus
You probably ran out of memory - what makes you think that you can do it using less memory? This is a function of your data set and server RAM. You may have to reduce the one or increase the other.
But perhaps you should post the code that your tried. Please include the field names (ie not LOAD *) for diagnostic purposes.
Hi Jonathan,
I will try another time
May be a issue in the cross table logic I used
Thanks for your time
Regards
Jeba