Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
mihai_iov
Contributor II

How to calculate dates with no activity?

Assuming I have the following table:

DateTime periodFractionActivity_type
17-04-18Whole Day1 7
18-04-18Half Day(until 14)0.57
19-04-18Half Day(after 14)0.57
20-04-18Half Day(until 14)0.57
20-04-18Half Day(after 14)0.57
24-04-18Quarter Day1(until 11)0.25 7
24-04-18Quarter Day2(11 to 14)0.257
24-04-18Quarter Day3(from 14 to 16)0.257

I need to calculate the amount of missing Fraction for a certain date range(which I filter using a Multi Box).
Normally every day should have a total of Fraction of 1, but there might be Time periods in which no activity was introduced.
Now, I need a way to bring the following output:

DateTime periodFraction
18-04-18Half Day(after 14)

0.5

19-04-18Half Day(until 14)0.5
23-04-18Whole Day1
24-04-18Quarter Day4(from 16 to end of program)0.25

Explanation: The Fraction of a single day should sum up to 1. If it doesn't, the rest of the day should be in the output table. Also if there is no data for a working day(case in point the date 23-04-18 doesn't have any data recorded), the Time Period should be "Whole Day" with Fraction of 1 in the output table.

Now the question is: How can I obtain the output table with the requested dates?

1 Reply
Highlighted

Re: How to calculate dates with no activity?

I think what you really need is to populate your missing data with may be Fraction as 0.

Generating Missing Data In QlikView