Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
UserLogin | App_Instance_name | App_Instance_Status | Creation date | |||
---|---|---|---|---|---|---|
ABC | AD | provisioned | 01-Oct-2018 | |||
XYZ | LDAP | Provisioned | 01-Oct-2018 | |||
ABC | LDAP | Provisioned | 01-Oct-2018 | |||
ABC | Exchange | Provisioned | 01-Oct-2018 | |||
XYZ | Exchange | Revoked | 01-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.
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()) |
---|---|
ABC | True |
XYZ | False |
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())
Thanks for your response. It worked for me.
Please let me know how can I change the status of this post as "correct" or something else to close it.