# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## What am I doing wrong?

Hello All,

I have tried different aggregates with no success. Anyone want to help get this simple equation to work.

I have two calculated fields formatted at Date 'DD'. Actual Time and Estimated time. I am trying to calculate the error percentage in decimal format.

Equation:

=([Act_TimetoComplete]-[Est_TimetoComplete])/([Act_TimetoComplete])

Example Data:

=(12 - 10) / (12) = .1666667

QlikSense is calculating this incorrectly. This example is showing .063011596531349.

UPDATE - after helpful replies.

The calculation was working this whole time (I had a long day yesterday). I was comparing my results to the Act/Est fields as a Dimension "(12 - 10) / (12) = .1666", rather then a Measure (44.94 - 42.12) / (49.94) = .06301.

Thanks.

1 Solution

Accepted Solutions
Honored Contributor II

## Re: What am I doing wrong?

What I would suggest is to troubleshoot your formula create a simple table and add three measures, your est and act fields plus your equation then your dimension data should be what you are grouping on.   this will give you visibility of where in your data you have issue.

2 Replies
Honored Contributor II

## Re: What am I doing wrong?

What I would suggest is to troubleshoot your formula create a simple table and add three measures, your est and act fields plus your equation then your dimension data should be what you are grouping on.   this will give you visibility of where in your data you have issue.

## Re: What am I doing wrong?

If you want to calculate with the day-number you will need to grab this number and not formatting a date or even a timestamp to the visual day because the real value of it will be remain a date or a timestamp. This meant you will probably need something like this:

= (day([Act_TimetoComplete])-day([Est_TimetoComplete])) / day([Act_TimetoComplete])

- Marcus