Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chrisg
Partner
Partner

How to count the length of the intervall (in diagram)?

Hello,

i would like to count the length of the intervall and the number of intervals in the diagramm.

(not in the script)

i have a date and a value 0 or 1

ex

1.1.2016  0

2.1.2016  1

3.1.2016  1

4.1.2016  1

5.1.2016  0

6.1.2016  0

7.1.2016  1

8.1.2016  0

9.1.2016  1

10.1.2016  1

11.1.2016  0

12.1.2016  1

...

so i do have:

- 2 intervall of the length of 1

- 1 intervall of the length of 2

- 1 intervall of the length of 3


Any approch?

Many thx

Christoph

Do or Do Not. There is no try!
10 Replies
migueldelval
Specialist
Specialist

Hi Cristoph,

Could you explain a little bit your question? Or attach an example.

Regards

Miguel del Valle

Anil_Babu_Samineni

Perhaps this

Count(Interval(Len(Date#(Datefield,'DD.MM.YYYY')),'0','1') FieldName)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
chrisg
Partner
Partner
Author

Hi Miguel,

here we go:

number of intervals based on the value 1 and to count all intervals

but i need a solution in the diagram

manx thx

Do or Do Not. There is no try!
Anil_Babu_Samineni

Like this

PFA

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
chrisg
Partner
Partner
Author

Unfortunately this does not work - sorry

Do or Do Not. There is no try!
marcus_sommer
MVP & Luminary
MVP & Luminary

I'm not sure if a pure gui solution will be possible but with some script-precalculation it might be solvable. Maybe this one within the attachment could be a starting point.

- Marcus

chrisg
Partner
Partner
Author

Many thx - that is helpfull!

Do or Do Not. There is no try!
anagharao
Creator II
Creator II

Hi, You could use class as well.

chrisg
Partner
Partner
Author

Many thx - very nice approch

Do or Do Not. There is no try!