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

Multiple if

Hi All,

I am new to QlikView and have found a lot of useful on these forums! However, I cannot work out how to solve the following problem:

I have two calculations as follows:

sum (if ([Entry Date] > (today()-(17*7)), [Total Hrs], '0'))
- this shows me the total number of hours worked in the last 17 weeks

Sum ( {$<Project_Type= {"Project"} >} [Total Hrs])
- this shows me the total number of hours worked on a project (called project in this case) since time started being recorded.

How do I combine the two so I can show total numbers of hours worked on a project in the last 17 weeks?

Thanks!

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello and welcome to the Forums,

I'd try something like

Sum({< [Entry Date] = {">$(=Date(Today() - (17 * 7)))"}, Project_Type = {"Project"} >} [Total Hrs])


Take care of the date and time formats.

Hope that helps!

View solution in original post

3 Replies
Not applicable
Author

Hello,

Use below expression...hope that will work..

sum({$<Project_Type = {"Project"},[Entry Date]={">$(=today()-(17*7))"}>} [Total Hrs])

Miguel_Angel_Baeyens

Hello and welcome to the Forums,

I'd try something like

Sum({< [Entry Date] = {">$(=Date(Today() - (17 * 7)))"}, Project_Type = {"Project"} >} [Total Hrs])


Take care of the date and time formats.

Hope that helps!

Not applicable
Author

This seems to have done the trick! Many thanks!!