Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Exp

Hi all

What does this below statement do ?

Brand= P(Brand) * P(Brand_S),

Thanks

1 Solution

Accepted Solutions
avinashelite

Brand= P(Brand) * P(Brand_S)

Theoretically it will take the common keys between the Brand and Brand_S and use that as the filters for the Brand column and based on this the count will calculated

View solution in original post

8 Replies
Siva_Sankar
Master II
Master II

Hi John,

Your expression wont work. But the logic is intersection in set analysis. You can refer an example here for better understanding. Set analysis intersection

Siva

smilingjohn
Specialist
Specialist
Author

Hi Sivasankar

thanks for the reply the full expression is like this below ...  can you please explain this what is it doing ?

=Count( DISTINCT

  {

  <

P = {S,O},

  Date = {">=$(vPeriod_StartDate)<=$(vPeriod_EndDate)"},

  Brand= P(Brand) * P(Brand_S),

  Date_P = {"<=$(Max_ClosedLead_Date)"},

>

  }

  ID

  )

Anonymous
Not applicable

Hi ,

Here P is used for possible selection,

In set analysis p and e both are helping to possible and exclusion in of the selections.

for all possible Brand is multiplying with Brand_s.

Thanks

Paridhi

rahulpawarb
Specialist III
Specialist III

Hello John,

Trust that you are doing well!

Said part of the expression will fetch common values from possible Brand and possible Bran_S (i.e. Function P() will give you all possible values whereas * will return records belongs to both the set)

Hope this will help.

Regards!

Rahul

Siva_Sankar
Master II
Master II

John Roy,

=Count( DISTINCT // counting the distinct values

  {

  <

P = {S,O}, //

  Date = {">=$(vPeriod_StartDate)<=$(vPeriod_EndDate)"},

  Brand= P(Brand) * P(Brand_S),

  Date_P = {"<=$(Max_ClosedLead_Date)"},

>

  }

  ID

  )

It is actually counting distinct IDs with P field having values S and O

from the vPeriod_StartDate to  vPeriod_EndDate for the brands that exist in Brand as well as in Brand_S

with Date_P less than or equal to closedlead date..

Count distinct --counts the distinc IDs

Brand= P(Brand) * P(Brand_S) -- IDs for the Brands that are common in Brand column as well as in Brand_S Column

Actually difficult to explain in words, but to understand better you can post a sample file

Siva

beck_bakytbek
Master
Master

Hi John,

look at this: https://www.youtube.com/watch?v=4lh-207n2Gk

i hope that helps

beck

avinashelite

Brand= P(Brand) * P(Brand_S)

Theoretically it will take the common keys between the Brand and Brand_S and use that as the filters for the Brand column and based on this the count will calculated

Anil_Babu_Samineni

Yes, As Avinash said it will work as Inner Join in DBs

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