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

Indirect Set Analysis for P() and E()

Dear all

I have attached my qvw I want to understand what is indirect set analysis how we can use E() and P() both function in my data.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
6 Replies
Not applicable

Indirect Set Analysis

• p( ) = Possible

• e( ) = Excluded

Excluded

Possible

Customer = p({<Year={$(=max(Year)-1)}>} Customer)

Returns customers who had an association to last year.

sum(({<Year={$(=max(Year))},

Customer = p({<Year={$(=max(Year)-1)} Customer>}) Sales)

Returns this year’s sales for customers who had sales last year.

Indirect Set Analysis

sum({$<CompanyName = p({$<CategoryName={'Baby Clothes'}>}

CompanyName)>} Sales)

Sales for Customers who purchased Baby Clothes.

The set p({}) returns the values of CompanyName (Customer) that

purchased Baby Clothes.

sum({$<CompanyName = p({$<CategoryName={'Baby Clothes'}>}

CompanyName) - p({$<CategoryName={'SportsWear'}>}

CompanyName)>} Sales)

Sales for Customers who purchased Baby Clothes but not

Sportswear.The first set p({}) returns CompanyName that purchased

Baby Clothes.The second set p({}) returns CompanyName that

Purchased SportsWear.The Unary Operator "-" between the two gives

a list of Customers (CompanyName)that belong to the first but not the

other set.

vikasmahajan
Author

Thanks

can you explain me please put this expressions in qvw and attach.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable

iN SCRIPT-

 
LOAD date_field,
day(date_field) as day,
Month(date_field) as month,
Year(date_field) as year,
sales
FROM TABLE

Dimension- year

EXPRESSION--

sum( {$<year = E({1<year={"*09*"}>})>} sales) //Excluded Sale

********************************

Dimension- year

EXPRESSION--

sum( {$<year = P({1<year={"*09*"}>})>} sales) //Possible Sale

vikasmahajan
Author

Can you please modify set analysis demo and send back

thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anil_Babu_Samineni

i am also Confused,

We can write like this

Sum({<Year -= {"*09*"} Sales)

Instead of this.

sum( {$<year = E({1<year={"*09*"}>})>} sales)


Can you explain, Which scenario we are using P() and E()?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
klausskalts
Partner - Creator
Partner - Creator

What you are doing is entering a 'normal' Set Analysis formula. That is used for direct selection of transctions to include in the calcullation of an expression - e.g. all transaktions in the years containing the value 09 (in your example).

P & E are used for inderect selections. e.g.

  1. Show all sales for customers which have bought a specific product.
  2. Show all sales for customers which have not bought a specific product.
  3. Show all sales for customers which have bought a specifik product but NOT bought another specific product

etc .......

Makes sense?