Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need help to write an expression logic

Hi All,

I have a requirement where I had loaded a table using an excel file into app.The data loaded have below sample schema:

UserLoginApp_Instance_nameApp_Instance_StatusCreation date







ABCADprovisioned01-Oct-2018
XYZLDAPProvisioned01-Oct-2018
ABCLDAPProvisioned01-Oct-2018
ABCExchangeProvisioned01-Oct-2018
XYZExchangeRevoked01-Oct-2018

This is a sample data where same user will have account for AD, LDAP and exchange where status for thee accounts could be provisioned or revoked.

Now I have a requirement where I need to create a chart to identify where if user has all 3 accounts in provisioned state then return 'true' else 'false'. based on the return value chart will be created.

Now here I am facing below challenges:

1. How can I check all 3 rows for same user and verify the status of it.

2. What is the appropriate place to write the expression for above requirement. Do i need to create a variable or custom Master Item. Not sure about it.

Kindly help me on this.

Thanks in advance.

3 Replies
Øystein_Kolsrud
Employee
Employee

If I understand you correctly, you could achieve what you want by using the following measure:

if (Count({<App_Instance_Status={'Provisioned'}>} App_Instance_name) = 3, True(), False())

If you use this as measure, and "UserLogin" as dimension, then you would get the following table based on your data:

UserLogin=if (Count({<App_Instance_Status={'Provisioned'}>} App_Instance_name)  = 3, True(), False())
ABCTrue
XYZFalse

The set analysis will ensure that you only count those entries where "App_Instance_Status" is set to "Provisioned". Depending on your data, you might want to add the keyword "distinct" to the count as well. Like this:

if (Count(distinct {<App_Instance_Status={'Provisioned'}>} App_Instance_name) = 3, True(), False())

Anonymous
Not applicable
Author

Thanks for your response. It worked for me.

Anonymous
Not applicable
Author

Please let me know how can I change the status of this post as "correct" or something else to close it.