Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List of incidents

Hello,

Im trying to calculated the up time / downtime of a system.

I have an excel like this.

DateCauseSolutionDownTime (in minuts)Status
25.01.2013Upgrading DBUpgraded DB and restarted system235Unavailable

Every date that doesn't have a record in the list should have 0 downtime, and Up time should be 24*60=1440.

So in January i should have a up time of 31(days)*24(hours)*60(minutes)=44640(100% Up time)-235(downtime)=44405(Actual up time).

Is it possible to add the up time rows dynamically based on the downtime rows? Or do i need to add every date in the list and manually calculated the up time for each day? Please don't hesitate to ask i you require more information or if i am being unclear on my issue.

Best Regards,

Lasse Rolstad

EDIT: Added test qvw as attachment

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like attached?

View solution in original post

10 Replies
swuehl
MVP
MVP

You can probably add records in the script to achieve what you want, but since you store only downtime in your records, why not calculate the effective uptime in the front end, like

=count(distinct Date) * 1440 - sum(DownTime)

This just needs a master calender, which I assume you already have.

Not applicable
Author

Henric's blog post will help you.

Please go through following link

http://community.qlik.com/blogs/qlikviewdesignblog/2013/02/05/populating-a-sparsely-populated-field

Karthik

Not applicable
Author

This works, but the dimension is on status, wich now has "Unavailable" and "-". Is there a way to force this to "Uptime"?

abeyphilip
Creator II
Creator II

If I understood the reqrmnt correctly, couldn't you add a calculated dimension as -

if(match(status,'Unavailable'), status, 'Uptime')

Regards,

Abey

Not applicable
Author

Dont know why, but now it says 100% uptime all the time. So it dosent seem to work.

abeyphilip
Creator II
Creator II

Hi Lasse,

Please post a sample qvw.

Regards,

Abey

cotiso_hanganu
Partner - Creator III
Partner - Creator III

Agree both with Karthikeyan S & swuehl

To cut the long story short, you can do the followings:

- dinamically extract in some variables the time interval you need to populate

- use an autogenerate command to create a kind of master calendar table

- afterwards join your data set with this new table

- reread the new created (joined) table populating the empty rows

Alternative solution: applymap might do the job even faster, instead of the last 2 steps (with the use of the defaultexpr option)

Don't forget to enjoy the "disqovery" process ! 😉

Not applicable
Author

I have posted a sample in the original post.

swuehl
MVP
MVP

Maybe like attached?