Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Dante_83
Contributor III
Contributor III

Sum by Distinct

Hello Experts,

 

I'm having trouble to Sum by distinct. Below is what my data would look like.

Phase Begin End Working Days
Induction 3/19/2020 4/2/2020 14
Disassembly 4/3/2020 4/25/2020 22
Inspection 4/26/2020 5/2/2020 6
Repair 5/3/2020 6/20/2020 48
Assembly 6/21/2020 7/12/2020 21
Test 7/13/2020 8/14/2020 32
Sold 8/15/2020 8/20/2020 5

 

I'm trying to Sum the Working Days by distinct names. For example, I want the sum of Induction, Disassembly, and Inspection. I'm using the below expression and I'm not having any success. Please help Thank you.

Sum(Aggr(Sum(distinct{<Phase = {'Induction','Disassembly','Inspection',}>} Working Days), Phase))

 

1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

I think your issue is that your Working Day should be delimited with square brackets:

Sum(Aggr(Sum(distinct{<Phase = {'Induction','Disassembly','Inspection',}>} [Working Days)], Phase))

View solution in original post

2 Replies
Lisa_P
Employee
Employee

I think your issue is that your Working Day should be delimited with square brackets:

Sum(Aggr(Sum(distinct{<Phase = {'Induction','Disassembly','Inspection',}>} [Working Days)], Phase))

Dante_83
Contributor III
Contributor III
Author

Lisa,

 

I added the square bracket and got rid of an extra coma after Inspection and it work like charm. Thank you so much.