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

Expression within a set analysis

Hi, thank you for taking the time to read my question.

I have this data set below:

EmployeeIDHour1Hour2Salary
1-50500
150250
201700
300500
420250
430700
550500
5-2-1250
5-31500
620250
6-20700

 

And what I'd like to happen is to display only that has a total of 0 for Hour1 and Hour2 and display the sum of the salary as well. Below is the desired result:

EmployeeIDHour1Hour2Salary
100750
300500
500750
600950

 

Here's what I tried to use:

Sum({<Hour1 = {"=sum(Hour1)=0"},Hour2={"=sum(Hour2)=0"}  >}Salary)

But obviously, it is not working. Appreciate your help!

Thanks in advance! 

 

 

 

 

Labels (3)
22 Replies
marksouzacosta
Partner - Creator II
Partner - Creator II

@sunny_talwar now I agree 100% with you.

Read more at Data Voyagers - datavoyagers.net
vidamakiling
Contributor II
Contributor II
Author

Hello,

What if some of the values are negative?

 

Right now it gave me this:

 

EmpID      Hour1     Hour2    Salary

1                  -5              0              750

1                   5              0               750

2                   2               0              950

2                   -1              0              950

2                  -1               0              950

 

This is just an example unrelated to my original post. I used the expression within a set analysis but what I'd like is for it to display like this

EmpID      Hour1     Hour2    Salary

1                  0              0              750

2                  0              0               950

 

Thanks!

        

marksouzacosta
Partner - Creator II
Partner - Creator II

This one you can solve just adding a straight chart using two dimensions and two measures:

Salary2.GIF

Read more at Data Voyagers - datavoyagers.net