Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegrattan
Creator III
Creator III

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
sunny_talwar

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))
Anonymous
Not applicable

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

mikegrattan
Creator III
Creator III
Author

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

sunny_talwar

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

mikegrattan
Creator III
Creator III
Author

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.

sunny_talwar

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
Creator III
Creator III
Author

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

 

 

rohitraut
Creator
Creator

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))

 

sunny_talwar

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?