cancel
Showing results for 
Search instead for 
Did you mean: 

Indicator Widget Custom Formula: Count unique where 5 or more exist

kwmacd
8 - Cloud Apps
8 - Cloud Apps

Hello, fellow Sisense Users

I'm trying to create an indicator widget that shows the number of unique email addresses in a dataset ONLY when there are 5 or more records with that email address AFTER the dashboard's date range filter is applied.

Example: My data source shows "lesson completions" where each record is one completion, with a user_email, lesson_name, and completion_date. The dashboard has a date range filter. I want my indicator widget to count the number of unique user_emails ONLY when 5 or more "lesson completions" exist in the filtered date range. 

Any sort of help is greatly appreciated

1 REPLY 1

vshen
Sisense Team Member
Sisense Team Member

Hi there!

I'm not sure I fully understand the request, but it seems like it can be achieved with an IF clause.

An example:

IF(count([user_emails])>5,count([user_emails]),0)

Here we count the unique user_emails; if there are more than 5 of them, we show this number; if not, we show 0 (you can replace it with NULL, for example).

Let me know if that is something you are looking for.

Additionally, you can read about the IF function (as well as all the other functions) here - https://docs.sisense.com/win/SisenseWin/function-references.htm#OtherFunctions

Best Regards,
Volodymyr