Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
georgegv
Contributor II
Contributor II

Formula Syntax

Hi

I need some help on the following:

The below is an example of what I am trying to do

=(count(distinct{<[Owner Name],Team={'Team 1'}>} [Owner Name])*8)*sum([Days of Work]),

(count(distinct{<[Owner Name],Team={'team 2'}>} [Owner Name])*5)*sum([Days of Work])

 

This is applied to a pivot table .

 

If I do the first part the formula works ( in Red), combining them is the challenge for me

Regards

1 Solution

Accepted Solutions
anushree1
Specialist II
Specialist II

Please check if this is what you have been looking for:

=if(Team='Team 1',(count(distinct[Owner Name] )*8)*sum([Days of Work]),

if(Team='team 2',(count(distinct[Owner Name] )*5)*sum([Days of Work])))

Also ensure Team 1 and team 2 are defined the same way in data as qlik is case sensitive

View solution in original post

7 Replies
sunny_talwar

What are you trying to do? Sum them?

=Count(DISTINCT {<[Owner Name], Team = {'Team 1'}>} [Owner Name])*8) * Sum([Days of Work])
+
Count(DISTINCT {<[Owner Name], Team = {'team 2'}>} [Owner Name])*5) * Sum([Days of Work])

or this

=RangeSum(
Count(DISTINCT {<[Owner Name], Team = {'Team 1'}>} [Owner Name])*8) * Sum([Days of Work]),
Count(DISTINCT {<[Owner Name], Team = {'team 2'}>} [Owner Name])*5) * Sum([Days of Work])
)

 

georgegv
Contributor II
Contributor II
Author

Hi

Thanks for reply however let me clarify. These two syntax should function as an IF statement

Regards
anushree1
Specialist II
Specialist II

what is the if condition you want to apply here

georgegv
Contributor II
Contributor II
Author

The if Statement must first evaluate based on team because the multiplication factor is specific to team

I trust this helps

sunny_talwar

Would you be able to elaborate with some sample data?

anushree1
Specialist II
Specialist II

Please check if this is what you have been looking for:

=if(Team='Team 1',(count(distinct[Owner Name] )*8)*sum([Days of Work]),

if(Team='team 2',(count(distinct[Owner Name] )*5)*sum([Days of Work])))

Also ensure Team 1 and team 2 are defined the same way in data as qlik is case sensitive

georgegv
Contributor II
Contributor II
Author

Thanks, this worked