Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
bharatkishore
Contributor III

Needed Set Analysis

Hi All,

I m using a guage chart and i have fields as Source_type and Month.

Now i needed an set analysis expression to write if(Source_Type=Non-Paid and target_month =[Data As of],Generated_Leads).

Attached excel for more info

Kindly help

1 Solution

Accepted Solutions
Not applicable

Re: Needed Set Analysis

for a best performance i sugest create a flag on scrip for use on set analisys

=Count({<Source_type={"Non-Paid"},flag={1}>} [Generated Leads(LeadHub)])

script

LOAD Market,

     Brand,

     Channel,

     Source_type,

     Month,

     [Generated Leads(LeadHub)],

     [Target Leads],

     [Data As Of],

     if([Data As Of]=Month,1) as flag

FROM

(ooxml, embedded labels, table is [Vs Target Paid_non Paid_Other]);

6 Replies

Re: Needed Set Analysis

From this Excel, What are you expecting. Which is the Expression you are applied?

Can you please post a sample application which demonstrates the problem and let me know expecting o/p

In excel, you have 3 sheets. Which sheet you want to use

Life is so rich, and we need to respect to the life !!!
Not applicable

Re: Needed Set Analysis

for a best performance i sugest create a flag on scrip for use on set analisys

=Count({<Source_type={"Non-Paid"},flag={1}>} [Generated Leads(LeadHub)])

script

LOAD Market,

     Brand,

     Channel,

     Source_type,

     Month,

     [Generated Leads(LeadHub)],

     [Target Leads],

     [Data As Of],

     if([Data As Of]=Month,1) as flag

FROM

(ooxml, embedded labels, table is [Vs Target Paid_non Paid_Other]);

bharatkishore
Contributor III

Re: Needed Set Analysis

Hi Anil,

Please find the attached excel and the qvw.

In the excel we have source_type,channel,dataasof,

Now i need to write an expression as if(sour_type=Non-Paid,Channel=Corporate and Target_month=Dataasof , sum(generated leads)

so which should show 9175 and total is 76266

bharatkishore
Contributor III

Re: Needed Set Analysis

Thanks a lot.. but please tell me why we have written flag, and if i want to include one more field i.e. channel = corporate what i need to write in ur expression

=Count({<Source_type={"Non-Paid"},flag={1}>} [Generated Leads(LeadHub)])

Not applicable

Re: Needed Set Analysis

sum({<Source_type={"Non-Paid"},Channel={"Corporate"},flag={1}>} generated leads)


Your perfomance stay beter because your informacio are calculate. You can too calculate direcly on set, but i think its not good.

bharatkishore
Contributor III

Re: Needed Set Analysis

Thank u so much...

Community Browser