Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/08/2024 02:28 PM
Hi Saviynt team,
I am trying to create a dashboard for the following SQL query with dashboard type as ES Donut Chart with the following data, but it's not showing any data.
Query:
SELECT 'Employees' AS 'label', u.firstname, u.lastname, u.email, u.username FROM users u WHERE u.statuskey = 1 AND u.customproperty51 = 'Employee' GROUP BY u.firstname, u.lastname, u.email, u.username UNION SELECT 'Contractors' AS 'label', u.firstname, u.lastname, u.email, u.username FROM users u WHERE u.statuskey = 1 AND u.customproperty51 = 'Contractor' GROUP BY u.firstname, u.lastname, u.email, u.username;
Dashboard Config
{"analyticsConfig":"1696","fieldToGroup":"LABEL", "filterMap":{"LABEL":["Employees","Contractors"]} }
But it's not giving any data in the Dashboard, showing No data as below
Could you please let me know how to make changes to the query to work for ES chart?
Solved! Go to Solution.
07/08/2024 07:34 PM
Refer Sample Below
07/10/2024 07:49 AM
Thank you for the example.
I have tried using the below one, it's working as expected. Just posting it, so that it will be helpful for others.
Analytics Query:
select u.username as 'UserName',u.firstname as 'FirstName',u.lastname as 'LastName',u.employeetype as 'EmployeeType', u.email as 'Email', CASE WHEN u.statuskey=1 and u.customproperty51='Employee' THEN 'Employees' WHEN u.statuskey=1 and u.customproperty51='Contractor' THEN 'Contractors' ELSE 'Not_Contractors_or_Employees' END as FilterValue from users u
Dashboard Query:
{"analyticsConfig":"1665","fieldToGroup":"FilterValue","filterMap":{"FilterValue":["Employees","Contractors"]}}
Chart Properties:
For ES Donut Chart/Simple Bar Chart -> {} -> If we give the empty flower brackets and save it, the data will be automatically populated.
For ES Tile -> Need to give something like below and then save it:
[{"tileType":1,"data":845,"displayName":"Active Accounts","clickable":"yes","chartType":"","objectName":"","className":"dashboard-stat red-intense","category":"","clickType":"analytics"}]
Note: Once we run the analytics report the data will be automatically populated in the tile.
Thank you, can close the ticket.
07/10/2024 08:59 AM
✅👍Please click the 'Accept As Solution' button on the reply (or replies) that best answered your original question.