Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rathorep
Contributor III
Contributor III

Sum for if expression

I have below expression:

//sum(Aggr(
if(
if(
if
(NetWorkDays(date(Above(TOTAL [Field Modified Date],1),'DD/MM/YYYY'),Date([Field Modified Date],'DD/MM/YYYY')-1)

<

(floor(sum(Aggr(
if
("Field Modified Group Code"=$(vFieldModifiedGroupCode),
Interval(sum(Aggr(Interval(Rangemax(Interval((Above(TOTAL [Field Modified Date],1) - [Field Modified Date])*(-1), 'd.hh.mm'),0),'d.hh.mm'),
[Win@proach Ticket Number],([Field Modified Date], (NUMERIC)))),'d.hh:mm'),0
),[Win@proach Ticket Number],([Field Modified Date],(NUMERIC))))))
,

(((
(interval(sum(Aggr(
if
("Field Modified Group Code"=$(vFieldModifiedGroupCode),
Interval(sum(Aggr(Interval(Rangemax(Interval((Above(TOTAL [Field Modified Date],1) - [Field Modified Date])*(-1), 'd.hh.mm'),0),'d.hh.mm'),
[Win@proach Ticket Number],([Field Modified Date], (NUMERIC)))),'d.hh:mm'),0
),[Win@proach Ticket Number],([Field Modified Date],(NUMERIC)))),'d.hh:mm')))
-
interval(
(round(sum(Aggr(
if
("Field Modified Group Code"=$(vFieldModifiedGroupCode),
Interval(sum(Aggr(Interval(Rangemax(Interval((Above(TOTAL [Field Modified Date],1) - [Field Modified Date])*(-1), 'd.hh.mm'),0),'d.hh.mm'),
[Win@proach Ticket Number],([Field Modified Date], (NUMERIC)))),'d.hh:mm'),0
),[Win@proach Ticket Number],([Field Modified Date],(NUMERIC))))))
-
(NetWorkDays(date(Above(TOTAL [Field Modified Date],1),'DD/MM/YYYY'),Date([Field Modified Date],'DD/MM/YYYY')-1)),'d.hh.mm')
))
,


(if
("Field Modified Group Code"=$(vFieldModifiedGroupCode),
(sum(Aggr(Interval(Rangemax(Interval((Above(TOTAL [Field Modified Date],1) - [Field Modified Date])*(-1), 'd.hh.mm'),0),'d.hh.mm'),
[Win@proach Ticket Number],([Field Modified Date], (NUMERIC))))),0
)))>'2.75' and Remarks <>'Exception','Exceeded Target',if((([Field Modified Group Code]<>$(vFieldModifiedGroupCode)) and Remarks='Exception'),'NA','Meet Target'))
='Exceeded Target', count( {<[Field Modified Group Code]={$(vFieldModifiedGroupCode)} , [Record Type] = {'IR'}, Severity={'Medium'}>}distinct [Win@proach Ticket Number])
,0)

//,[Win@proach Ticket Number]))

Result I am getting is:

Win@proach Ticket NumberField Modified DateWith the Expression shared
1972647/24/2020 14:380
1972647/27/2020 7:070
1972647/30/2020 13:211
1972647/30/2020 14:270
1972648/18/2020 23:120
20325711/10/2020 9:180
20325711/10/2020 9:220
20325711/25/2020 13:071
20325711/26/2020 12:390
20325711/26/2020 13:170
20325712/2/2020 0:110

 

Now i need to calculate sum on top of this, so when i am un commenting first and last bold lines, Its giving 0 in full column and total also is coming 0.

Sum should be 2 

Could any one help me urgently please.

 

Labels (1)
  • Other

1 Solution

Accepted Solutions
TimGarrod
Employee
Employee

Hi @rathorep  - you have posted this question in the Qlik Compose for Data Warehouses forum. 

Since this appears to be QlikSense or QLikView related, I recommend posting this question under the appropriate Data Analytics Forum.   (Unfortunately, I can't move it for you).

 

View solution in original post

1 Reply
TimGarrod
Employee
Employee

Hi @rathorep  - you have posted this question in the Qlik Compose for Data Warehouses forum. 

Since this appears to be QlikSense or QLikView related, I recommend posting this question under the appropriate Data Analytics Forum.   (Unfortunately, I can't move it for you).