# Executive dashboard - Without conversion goals

**URL:** <https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229>\
**Category:** Dashboarding\
**Tags:** dashboards\
**Created:** [October 23, 2023, 6:56am UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229 "2023-10-23T06:56:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soren\_vdc](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Soren\_vdc](https://community.dynatrace.com/u/Soren_vdc)\
**Post date:** [October 23, 2023, 6:56am UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229/1 "2023-10-23T06:56:31Z")

</div>

Hi,

I’m testing with&nbsp;[community-tips-tricks/ep19/ReadMeExecutiveOverview.md at main · dynatrace-perfclinics/community-tips-tricks · GitHub](https://github.com/dynatrace-perfclinics/community-tips-tricks/blob/main/ep19/ReadMeExecutiveOverview.md)

I have removed the conversion goals at the top of dashboards because we didn’t configured it for all applications (specially for SAP applic it’s not usefull).

But now the dashboard gives me empty values even after updating the query. When I check the code I just want as a test add specific application to the view but can’t find the way to do this.

I have tried with:

appsList = “\ My Applic \”;

Is there a specific config to add value to a variable in the code?

thx!

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 23, 2023, 7:13am UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229/2 "2023-10-23T07:13:43Z")

</div>

Hi,

As far as I can see this dashboard requires you to enter a Conversion Goal. I’ve also looked in the JSON and I don’t know if it wouldn’t be simpler to build a new one based on it rather than reworking the current one, as this parameter (Conv Goal) is included in each tile.

> <https://github.com/dynatrace-perfclinics/community-tips-tricks/blob/main/ep19/ReadMeExecutiveOverview.md#prerequisites>

R.

---

<div class="post-metadata">

**Author:** ![Soren\_vdc](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Soren\_vdc](https://community.dynatrace.com/u/Soren_vdc)\
**Post date:** [October 23, 2023, 7:38am UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229/3 "2023-10-23T07:38:15Z")

</div>

Hi,

Thanks for the answer. Indeed, I’m busy with checking the setup of the dashboard but still not sure why&nbsp; this code is not working.

For example for&nbsp; tile:

import { rumUserSessionsClient } from ‘@dynatrace-sdk/client-classic-environment-v1’;  
export default async function () {  
const startTime = Date.parse($dt\_timeframe\_from).toString(); // Get Dashboard Start Time  
const endTime = Date.parse($dt\_timeframe\_to).toString(); // Get Dashboard End Time  
const startShiftTime = startTime-(86400000\*$TimeShift); // Get TimeShift variable, convert to days and create startShift  
const endShiftTime = endTime-(86400000\*$TimeShift); // Get TimeShift variable, convert to days and create endShift  
var appsList = “\”“+$AppName[0]+”\“”;  
let i = 1;  
// Build Apps List  
while (i \< 10) {  
if ($AppName[i]==null) break;  
appsList = appsList+“,\”“+$AppName[i]+”\“”;  
i++;  
}  
appsList = “\”“+B2C Mobile Production+”\“”;  
// Create the USQL query string using the values above  
const query = ‘SELECT CONDITION (count(\*),WHERE starttime\>=’+startTime+’ and endtime\<=‘+endTime+’), CONDITION (count(\*),WHERE starttime\>=‘+startShiftTime+’ and endtime\<=‘+endShiftTime+’) from usersession where useraction.application in (‘+appsList+’)';  
// Fire off the USQL query and get the results  
const result = await rumUserSessionsClient.getUsqlResultAsTable({query: query, startTimestamp: startShiftTime, endTimestamp: endTime});  
var str1 = (result[“values”][0][0]-result[“values”][0][1]);  
if ((result[“values”][0][0])\>(result[“values”][0][1]))  
return result[“values”][0][0]+" (“+(str1)+” ↗🟢)“;  
else if ((result[“values”][0][0])\<(result[“values”][0][1]))  
return result[“values”][0][0]+” (“+(str1)\*(-1)+” ↘🔴)“;  
else  
return result[“values”][0][0]+” (“+(str1)+” =🟡)";  
}

I want to test with hard-coded one applic so I put appList to

appsList = “\”“my applic”\“”;

but error. The interface gives error but no more info about the error or what it’s expected.

Any idea?

---

<div class="post-metadata">

**Author:** ![Soren\_vdc](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Soren\_vdc](https://community.dynatrace.com/u/Soren_vdc)\
**Post date:** [October 24, 2023, 8:07am UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229/4 "2023-10-24T08:07:10Z")

</div>

Hi,

I’m a step futher, but still have issue to map the variable in the query string:

var appsList = “\”“My Application”\“”;  
// Create the USQL query string using the values above  
const query = ‘SELECT CONDITION (count(\*),WHERE starttime\>=’+startTime+’ and endtime\<=‘+endTime+’), CONDITION (count(\*),WHERE starttime\>=‘+startShiftTime+’ and endtime\<=‘+endShiftTime+’) from usersession where useraction.application = (‘+appsList+’)';

This is not working. Any Idea? There is also no information about the error in the UI. Can I find some more details about the error ?

thx!

---

<div class="post-metadata">

**Author:** ![Soren\_vdc](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Soren\_vdc](https://community.dynatrace.com/u/Soren_vdc)\
**Post date:** [October 24, 2023, 12:23pm UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229/5 "2023-10-24T12:23:48Z")

</div>

I have found the solution:

var app = $AppName  
// Create the USQL query string using the values above  
const query = ‘SELECT CONDITION (count(\*),WHERE starttime\>=’+startTime+’ and endtime\<=‘+endTime+’), CONDITION (count(\*),WHERE starttime\>=‘+startShiftTime+’ and endtime\<=‘+endShiftTime+’) from usersession where useraction.application=“‘+app+’” ';

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 24, 2023, 12:36pm UTC](https://community.dynatrace.com/t/executive-dashboard-without-conversion-goals/42229/6 "2023-10-24T12:36:08Z")

</div>

Wow great! Good to know 🙏
