Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ttal7878
Creator
Creator

Problem with set analysis

Hi,

Can anyone explain,  why the information is not displayed in table "Display Unique"?

I have an ID that meets all the conditions I defined in my set Analytics and is not yet displayed in the table "Display Unique".


It's problematic for me to upload my real model,

and I can't imitate the problem in an example model, So I'll try to explain with picture from my model.


I have a table "Display Unique" which counts the unique's according to the following parameters:

Lead_In_TMS={"Yes"},

ActionTypeName={"Lead"},

Source={"Online"}

Sale_Date={">=$(VMinDateIgnoreActionLeadTMSSource)<=$(VMaxDateIgnoreActionLeadTMSSource)"}>}

and ignore the following parameters:

Lead_In_TMS=

ActionTypeName=

Source=

The variables are calculated as follows:

VMinDateIgnoreActionLeadTMSSource=

=Timestamp(min({<ActionTypeName=,Lead_In_TMS=,Source=>}Sale_Date),'YYYY-MM-DD hh:mm')


VMaxDateIgnoreActionLeadTMSSource=

=Timestamp(max({<ActionTypeName=,Lead_In_TMS=,Source=>}Sale_Date),'YYYY-MM-DD hh:mm')


I'am using the following Set Analysis to count the unique's:

=count(DISTINCT {<ActionTypeName=,Lead_In_TMS=,Source=,

Lead_In_TMS={"Yes"},ActionTypeName={"Lead"},Source={"Online"},

Sale_Date={">=$(VMinDateIgnoreActionLeadTMSSource)<=$(VMaxDateIgnoreActionLeadTMSSource)"}>}

Unique)

What do I miss?


Display Unique.JPG


23 Replies
PrashantSangle

Hi,

Debug your expression follow below steps;

1: Remove Sale_Date from set analysis and check it is giving you output or not.

If yes

2: then set static value for Sale_Date in set expression

like Sale_Date={"2017-09-27 16:58"}

and check it is giving you output or not

if yes

then add only greater than expression and test.


Where you are not getting value you will found your issue.


Reagrds,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ttal7878
Creator
Creator
Author

I tried, but even if I do

=count(DISTINCT {< SaleDateKey1={">=(SaleDateKey1))"}>}Unique_Num)

                    

I don't get any results


SaleDateKey1=floor(Sale_Date)

=43005

lorenzoconforti
Specialist II
Specialist II

"Its format from the DB is '2017-09-28 08:00:12.290'

And in the script I used

  Timestamp (Sale_Date, 'YYYY-MM-DD hh: mm') as Sale_Date"

A bit random but, is there an extra space in your script after "hh:" that should not be there?

Also, why when setting your variables (e.g. VMinDateIgnoreActionLeadTMSSource) do you use Timestamp function? Shouldn't Sale_Date be in the correct format already (since you set it in your loading script)?

pradosh_thakur
Master II
Master II

=count(DISTINCT {<Sale_Date={">=$(=VMinDateIgnoreActionLeadTMSSource)<$(=VMaxDateIgnoreActionLeadTMSSource)"}>} Unique) 


try this once and see if you are getting any results

regards

Pradosh

Learning never stops.