Parsing text to numbers and dates

Quite often, we have to deal with data that are not in a format that QlikView can interpret as either dates or numbers. In these cases, we need to look at the data interpretation functions, Date# and Num#.

These functions accept a value and a format string. They use the format string to attempt to interpret the value.

In this recipe, we will look at using Date# and Num# functions to interpret our data correctly.

Getting ready

Load the following script:

Load
  Date#(Month, 'DD.MM.YYYY') As Month, 
  Num#(Sales, '#.###,##', '.') As Sales
Inline [
  Month, Sales
  01.01.2013, 1.000
  01.02.2013, 976
  01.03.2013, 1.100
];

How to do it…

These steps show you how to parse text to numbers and dates:

  1. Add a listbox for Sales and Month onto ...

Get QlikView for Developers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.