Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ttal7878
Creator
Creator

Set Analysis -problem

Hi,

Is the order of the dimensions important when performing a calculated in Set Analysis?


In the example attached, I am trying to count the ID's where source='online' and SaleDate between the Variables- vMinTimeStamp and vMaxTimeStamp and ignore the dimension-source

I have defined the variebles-

Let vMinTimeStamp =Timestamp(min(SaleDate),'YYYY-MM-DD hh:mm:ss')

Let vMaxTimeStamp= Timestamp(max(SaleDate),'YYYY-MM-DD hh:mm:ss')

in Set Analysis I have tried:

=count({$<SaleDate = {">=$(vMinTimeStamp)<= $(vMaxTimeStamp)"},source ={'online'},source = >}ID)

but it's not working, becouse I want to ignore the dimension "source"

In addition, I noticed that if I write in the beginning of the Set Analysis:  source =

like this:

=count({$<source = ,SaleDate = {">=$(vMinTimeStamp)<= $(vMaxTimeStamp)"},source ={'online'}>}ID)


the result is changing, why?? is the order in set analysis important?



My expectation should be displayed like this:

**if the user selects the sorce='email' - the result will not change,

the result will change only when the user selects SaleDate


1.JPG





Appreciates any help!

15 Replies
sunny_talwar

Right now vMinTimeStamp and vMaxTimeStamp are both expressions and are not driven by user inputs (at least directly).... are you looking for them to be driven by user inputs in an input box object?

ttal7878
Creator
Creator
Author

Yes

PrashantSangle

Hi,

use ignored source field in variable.

use vMaxTimeStampIgnoreSource and vMinTimeStampIgnoreSource variable as suggested by stalwar1


Regards,

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

As I have written to stalwar1‌,

In my original model, I have several Text Object , some of which I want to ignore the source dimension and some not,

How can i deal with this, when the user selects a date range?

(I want the variables  to be driven by user inputs in an input box object)

PrashantSangle

It is not possible in 1 variable.

Create 4 variable as suggested by sunny and use that in object as per your requirement.

Regards,

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

Thank you ALL!!