Knowledge Base Article

How to create a list of users with a current role

How to create a list of users with a current role

To get a list of the users with their roles you can use table usage.

Get the next fields from it - email and userRole.

In this table, you can find all the roles that these users had previously

 

[ALT Text: A table displaying two columns: "email" and "userRole." The "email" column contains redacted email addresses, while the "userRole" column lists different roles such as "Viewer," "Data Designer," "datadesigner," and "Designer." Some users appear multiple times with different roles.]

To avoid this, lets go to the elasticube, open table usage.

Create a Custom Column

 

[ALT Text: A screenshot of the Sisense Elasticube interface showing the usage table with multiple fields, including trackingId, timeStamp, userId, userRole, and more. An arrow points to the three-dot menu next to the usage table, where a dropdown menu is open. The "Add Custom Column" option is highlighted in red, indicating the selection for creating a new custom column.]

 

Name it - rank_date_ids

We will use the function RankCompetitionDesc (https://docs.sisense.com/main/SisenseLinux/mathematical-functions.htm)

Our query will look like this:

RankCompetitionDesc( email, [timeStamp] )

Press the Save button and Build the Elasticube


[ALT Text: A screenshot of the Sisense Elasticube interface showing the creation of a custom column named rank_date_ids in the usage table. The formula RankCompetitionDesc(email, [timeStamp]) is entered in the editor. An arrow points to the "Save" button, indicating the action to save the custom column. The status message at the bottom confirms that the formula has been parsed successfully.]

Go to the dashboard and edit our widget.

Add a filter for a column rank_date_ids = 1

[ALT Text: Dropdown menu interface with multiple selectable options. Check the box next to each option. "Add Filter" and "Usage Analytics Model" are visible. One item is selected and highlighted.]

As the result, we will get the current user roles for every user.

[ALT Text:  Table showing an email column with text obscured in red and a user-role column listing "Viewer" and "Data Designer".]

Updated 03-24-2025
No CommentsBe the first to comment