# Handling Qlik application data in PixelPerfect reports

This help topic provides guidelines for formatting certain types of Qlik analytics data in your PixelPerfect report.

## Handling dates and dual values

Dates and dual values are supported in PixelPerfect reports—for example, those used in autocalendars.

For example, the `My_Date_Field` field in this script excerpt:

```
[autoCalendar]:
  DECLARE FIELD DEFINITION Tagged ('$date')
FIELDS
  Dual(Year($1), YearStart($1)) AS [Year] Tagged ('$axis', '$year'),
...
DERIVE FIELDS FROM FIELD [My_Date_Field] USING [autoCalendar] ;		
```

In PixelPerfect reports, dual and date values are shown by default as serial numbers. To display them as dates, for example, you need to format them as dates in the template using the PixelPerfect designer.

Do the following:

1. Open the Field List menu available from the right-side panel in the designer.

2. Under Levels, expand or create the item that you want to format as a date.

3. Hover your cursor over the item and click the Add calculated field icon.

   Creating a calculated field

   Creating a calculated field

   Creating a calculated field ![Adding a calculated field for a level in the PixelPerfect designer.](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Resources/Images/ui_report-pixelperfect-gen-calc-field.png)

4. On the new calculated field, click the Edit icon.

5. Optionally, add a Name to change it from the default.

6. Next to Expression, click the More icon.

7. In the Expression Editor, paste the following expression, replacing `my_date_field` with the name of your date field:

   ```
   AddDays( #1899-12-30#, [my_date_field] )
   ```

8. Click OK.

9. Add the item to the report design surface.

   [Working with levels](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Reporting/Design/PixelPerfect/pixelperfect-work-with-levels.htm)

10. Set the date format you want to use in the Format String Editor. Do the following:

    1. On the design surface, select the item.

    2. Click the three-dot icon next to the item, and then click the gear icon.

    3. Click the Text Format String icon under .

    4. Select the date format you want to use, and click OK.

## Learn more

* [Designing PixelPerfect report templates](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Reporting/Design/PixelPerfect/design-pixelperfect-templates.htm)
* [Creating highly formatted tables](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Reporting/Design/PixelPerfect/pixelperfect-highly-formatted-table.htm)
* [Dual Script and chart function](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/FormattingFunctions/Dual.htm)