![]() The code to do this can be placed into a variable like this: let vSrcDateFmt = 'YYYY-MM-DD' When loading from a text file this needs to be done twice for each date – once to convert it from a string to a number and then again to format it as a date. ![]() Variables can help here.įor example, a common requirement is to format dates. There are some tasks that you can end up doing many times over in a load script, some of these can make code look untidy and mean that a subtle change in requirement can require a large number of changes to the load script. However, the usage of similar variables in the load script is another way they can be utilised, to clean up script and remove repetition. These variables can make code reuse even more flexible, which is great for pivot style tables where there is a fixed number of columns (perhaps 12 months) and more than one total column (perhaps a Total and an Average).Īs I suspect this usage of parameterized variables has been covered elsewhere before I will not repeat it here. The ability to pass parameters into variables is something I have been using for some time, after picking up the technique from Stephen Redmond’s blog. ![]() In this post I show how and give a recipe for a NetworkDays function that excludes public holidays. The implementation of variables and dollar sign expansion in QlikView and Qlik Sense is incredibly flexible and can be used to great effect in load scripts.
0 Comments
Leave a Reply. |