# Can't use graph in new UI Dashboard

**URL:** <https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545>\
**Category:** DQL\
**Tags:** dql, charts\
**Created:** [November 9, 2023, 3:44pm UTC](https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545 "2023-11-09T15:44:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark\_forrester](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_forrester/32/12542_2.png) [@mark\_forrester](https://community.dynatrace.com/u/mark_forrester)\
**Post date:** [November 9, 2023, 3:44pm UTC](https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545/1 "2023-11-09T15:44:36Z")

</div>

So I have a query to take the last value seen per day for a field monthly requests, this filed is a running total per hour of requests and as the name suggests gets reset every month.

```javascript
fetch bizevents , scanLimitGBytes: 100
| filter event.type == "XXXXXXX"
| summarize {monthlyRequests = takeLast(monthlyRequests)},by:{bin(timestamp, 1d)}

```

I want to graph this on the new UI but the visualization options do not show for any graph

 ![mark_forrester_0-1699544430700.png](https://global.discourse-cdn.com/dynatrace/original/1X/bef3090ec5fa405514ecd55a1b0af924d5bb8f6f.png)

However exactly the same query in the logs and events explorer does allow bar charting

 ![mark_forrester_1-1699544574753.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/0/60672c0a9369ace7a6e84eb7dcd7d48f81c338a9.png)

Any ideas why the new UI is not allowing charting using this Grail query?  
Also if someone can advise how to get the date to be just the date and not add the 00:00:00 for aesthetic reasons that would be great

EDIT, I fixed the displayed timestamp using this line of DQL instead

```javascript
| summarize {monthlyRequests = takeLast(monthlyRequests)},by:{Date = formatTimestamp(bin(timestamp, 1d),format:"dd-MM-YYYY")}

```

---

<div class="post-metadata">

**Author:** ![mark\_forrester](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_forrester/32/12542_2.png) [@mark\_forrester](https://community.dynatrace.com/u/mark_forrester)\
**Post date:** [November 9, 2023, 4:07pm UTC](https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545/2 "2023-11-09T16:07:34Z")

</div>

Also is there a way to do a bin(value, 1M)

It appears that DQL does not match the older intervals in the product and stops at 1d

**Time literals**

The following time literals can be used to express durations:

- ns: Nanoseconds
- ms: Milliseconds
- s: Seconds
- m: Minutes
- h: hours
- d: Days

---

<div class="post-metadata">

**Author:** ![mark\_forrester](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_forrester/32/12542_2.png) [@mark\_forrester](https://community.dynatrace.com/u/mark_forrester)\
**Post date:** [November 9, 2023, 5:57pm UTC](https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545/3 "2023-11-09T17:57:45Z")

</div>

After some playing I’ve found half the root cause of the issue.

On ingestion of the BizEvent the field monthlyRequests is actually seen a string field and to make the new UI use it as a number I had to add the toLong() to the query.

```javascript
| summarize {`Monthly Requests` = toLong(takeLast(monthlyRequests))},by:{Date = formatTimestamp(bin(timestamp, 1d),format:"MM-dd-YYYY")}

```

It seems the log and events app does this without having to use the toLong() to convert it to a number so there is an inconsistency between the apps on the platform.

However some charts have appeared but not the required line/bar charts

 ![mark_forrester_0-1699552944274.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/1/c1f1b34806168e8c79e0f5e3a3c48dba9fbafb97.png)

 ![mark_forrester_1-1699552977675.png](https://global.discourse-cdn.com/dynatrace/original/2X/6/618f40b6641938ebbfd6d6af7958cef737d94b7a.png)
