Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sr_qlikview
Creator
Creator

set analysis - how to get a field value

If user selected an employee A, emp A falls into a Region R1.

now i want to find sum of sales for that region R1 (not just emp A, all employees) to compare the sales with emp A.

Emp Region Sales

A      R1        10

B      R2         20

C      R1         30

selected Emp A

my shld look like

sum({<region = R1> }sales = 40

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

sum({<Emp= , Region = p() >} Sales)

View solution in original post

2 Replies
swuehl
MVP
MVP

Try

sum({<Emp= , Region = p() >} Sales)

Not applicable

With Set Analysis there are two modes it operates under.

Default - "Please consider the existing selections that have been filtered and apply my analysis on top of that."

{1} - "Users are incompetent and will filter to an employee even though they want everything for a region.

With just what you described you may be fine with

{1<region = {'R1'}>sales}

Not sure at all why you said sales = 40.

There are some other alternatives that you could use in between "I trust the users selections" and "Users can't be trusted ignore all of their filters"

You could do

{<Emp =, region = {'R1'}>sales}

Which means "I don't trust the end user regarding an employee filter because they constantly click an employee in the region but wonder why the region totals aren't right. But I do trust that their filters for range of time, range of products etc." Basucally the set analysis says "use any employee" ignoring it's filters but other filters are still applied.

Hope that helps,