Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
mikegrattan
Contributor II

Using a value condition for Set Analysis

I have a Set Analysis expression that gives me a count of login passes by user for the current day.  I'd like to filter it so it only shows when the count >3.  Can someone point me in the right direction?

 

Count({<[Access Type]={'Login Access'},LogTimeStamp= {">=$(=daystart(today())-0)"}>} distinct UsageId)

Labels (3)
10 Replies

Re: Using a value condition for Set Analysis

May be just this

If(Count({<[Access Type] = {'Login Access'}, LogTimeStamp = {">=$(=DayStart(Today()) - 0)"}>} DISTINCT UsageId) > 3,
Count({<[Access Type] = {'Login Access'}, LogTimeStamp = {">=$(=DayStart(Today()) - 0)"}>} DISTINCT UsageId))
qlikrenn
New Contributor II

Re: Using a value condition for Set Analysis

Thanks. and simply add the next parameter which allows you to supply default val if condition fails (or whats equiv to an 'else').

mikegrattan
Contributor II

Re: Using a value condition for Set Analysis

That still shows a list of users who have used ❤️ login passes.

Re: Using a value condition for Set Analysis

Would you be able to share a sample to check this out?

mikegrattan
Contributor II

Re: Using a value condition for Set Analysis

I'm using the License Monitor application in Qlik Sense Enterprise.  I just added a new sheet with a table and the following fields:

User Name
LogTimeStamp
Access Type
Count of access passes used today if count > 3 (set analysis expression)

The goal is to show in this table only those users who have used more than 3 login access passes today.

If you need a copy of the app let me know and I can attach it to the question.

Re: Using a value condition for Set Analysis

I think sample file would help me understand this. Make sure to zip the file before you attach because this new community doesn't allow to attach .qvf file without zipping it.
mikegrattan
Contributor II

Re: Using a value condition for Set Analysis

Here's a copy of the app; go to the last sheet for the table I'm working on.  Thanks for looking.

 

 

rohitraut
Contributor

Re: Using a value condition for Set Analysis

hii,

try this,

if(Count({<[Access Type] = {'Login Access'}, LogTimeStamp = {">=$(=date(DayStart(Today()) - 0,'YYYY-MM-DD hh:mm:ss'))"}>} DISTINCT UsageId)>3,

Count({<[Access Type] = {'Login Access'}, LogTimeStamp = {">=$(=date(DayStart(Today()) - 0,'YYYY-MM-DD hh:mm:ss'))"}>} DISTINCT UsageId))

 

Re: Using a value condition for Set Analysis

Are you looking to see only those Users who have logged in more than 3 times? May be try this

Count({<[Access Type] = {'Login Access'},
	LogTimeStamp = {">=$(=Date(Today(), 'YYYY-MM-DD hh:mm:ss'))"},
        UsageId = {"=Count({<[Access Type] = {'Login Access'}, LogTimeStamp = {[>=$(=Date(Today()-1, 'YYYY-MM-DD hh:mm:ss'))]}>} DISTINCT UsageId) > 3"}>
      } DISTINCT UsageId)

or are you looking to see the table only if the total number of rows in the table is more than 3?