Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Prblem in Set Analysis logic

Hi,

I am new to Qlikview and facing strange issue with small set analysis expression

This is my expression

SUM({<[Campaign Channel]={'PPC'}>}[Site Visit Vis Num])


Actually there is data for campaign channel and as well for Site Visit Vis Num as I checked individually.

If I combine as expression it is returning '0' for all dates.

Can anybody help me how to resolve this issue. Thanks in advance

Regards,

Kumar

30 Replies
Anonymous
Not applicable
Author

Hi Angad,

Sorry, Pls find the screen shot

Not applicable
Author

There has to be a minor thing, which we are missing in here.

Can you please share your QVW ?

btw, how come I see numbers in the Display Visits column adjacent to PPC??

Anonymous
Not applicable
Author

In that expression I removed Campaign channel = 'Display'. This QVW file is size is 170 Mb

Regards,

Kumar

Not applicable
Author

Can you create a new QVW file where you have only that chart?

oleg_datsenko
Contributor II
Contributor II

Hi Kumar,

Try to use SUM function above IF function, like this:

=sum(

          if(your_condition,[Site Visit Vis Num],0)

          )

It was a bit ...strange for me too for a first time... after Excel

And about the script... please, open a script(CTRL+E), open Search window(CTRL+F), find "as [Site Visit Vis Num]" and provide us with the load block(s) which contains this string.

I suppose it was wrong interpreted(not like a number).

Also, try to define a set identifier in your set expression:

SUM({1<[Campaign Channel]={'PPC'}>}[Site Visit Vis Num]) - if you want to ignore all current selections

or

SUM({$<[Campaign Channel]={'PPC'}>}[Site Visit Vis Num]) - if you want to consider current selections

It looks like you've missed a set identifier... but I'm not sure that it really matters.

Oleg

Anonymous
Not applicable
Author

I tried with that expression, but still returns 0

pls find the fact set block with that field as highlighted

Fact_site_visit:

LOAD site_visit_key,

    site_visit_visitor_key,

    site_visit_visitor_ip_key,

    site_visit_team_key,

    site_visit_campaign_key,

    //site_visit_account_key,

    site_visit_start_datetime_key,

    site_visit_start_hms_time_key,

    site_visit_visitor_system_configuration_key,

    site_visit_search_key,

    site_visit_page_key,

    site_visit_geography_key,

    site_visit_parameter_key,

    site_visit_referrer_parameter_key,

    site_visit_referring_url_page_key,

    site_visit_end_datetime_key,

    site_visit_end_hms_time_key,

    site_visit_racksid as [Site Visit RackSID],

    site_visit_record_count as [Site Visit Record Count],

    site_visit_sys_generated_visit_id,

    site_visit_vis_num as [Site Visit Vis Num],

    site_visit_page_visit_num as [Site Visit Page Num],

    site_visit_post_page_event as [Site Visit Post Page Event],

    SubField(site_visit_post_page_event,',') as Post_Page_Event,

    site_visit_hit_source as [Site Visit Hit Source],

    site_visit_page_duration as [Site Visit  Page Duration],

    site_visit_chat_started_flag as [SIte Visit Chat Started Flag],

    site_visit_email_and_apps_signup_flag as [SiteVisit Email and Apps Signup Flag],

    site_visit_cloud_signups_flag as [SiteVisit Cloud Signups Flag],

    site_visit_site_submissions_flag as [SiteVisit Site Submissions Flag],

    site_visit_ordered_flag as [SiteVisit Orders Flag],

    site_visit_source_system_name as [Site Visit Source System Name],

    site_visit_source_system_column as [Site Visit Source System Column],

    site_visit_source_system_id_nk as [Site Visit Source System ID nk]

FROM

[fact_site_visit.qvd]

(qvd);

Not applicable
Author

Can you please try

SUM({$<[Campaign Channel]={'PPC'}>} if(isnull([Site Visit Vis Num])=-1,0,[Site Visit Vis Num]))


you could also be getting the missing values first. May be you should double click on the field to sort in order to check if the column holds any values at all.

oleg_datsenko
Contributor II
Contributor II

Kumar,

and now, could you please open the Table viewer(CTRL+T), find a tab "Fact_site_visit" and make a screenshot with the field "site_visit_vis_num" ?

Are there no more any [Site Visit Vis Num] fields in your script? Is it unique indeed?

Oleg

Anonymous
Not applicable
Author

Hi,

Can you pls find the screen shot.

Regards,

Kumar

Anonymous
Not applicable
Author

Hi,

Still I am seeing 0's only and having data also.

data is available in both the tables also