13 Jun 2023 08:22 AM - last edited on 13 Jun 2023 11:04 AM by Ana_Kuzmenchuk
We have two DQL and want to compare both the outputs in single format. Unable to find suitable option.
Please do suggest.
Solved! Go to Solution.
13 Jun 2023 11:22 AM
Hi @amita
Thanks for reaching out. Can you please add some more details to your use case?
What data are you querying? How do you want to compare it? What would be a suitable representation for you etc.
Thanks, Philipp
13 Jun 2023 11:49 AM
Hey@Philipp
Thanks for responding,
Basically I want to compare metric for different timeframe.
I am fetching data from bizevent(fetch bizevent),currently I am able to
get data for specific single timeframe .
Now I need a tabular output where same metric can be monitored for two release(timeframe).
I also tried creating two seperate DQL for each timeframe, but didnt find way to merge those two column in single table
Here is some highlevel Expected output
Application_metric_name | Release1(2nd may) | Release2(6th June) |
Authentication_avg_CPU_usage | 70% | 73% |
14 Jun 2023 06:59 AM
@amita thanks for the details.
One way you likely already figured out is putting two separate queries next to each on a dashboard, for example, via a single-value tile.
If you need to merge the result, you could leverage the lookup command as a workaround.
Example query:
fetch bizevents, from:now()-7d
| summarize this_week = avg(toDouble(amount))
| fieldsAdd helper="test"
| lookup [ fetch bizevents, from:now()-14d, to:-7d
| summarize previous_week = avg(toDouble(amount))
| fieldsAdd helper="test"]
, sourceField:helper, lookupField:helper
| fieldsRemove helper, lookup.helper
| fieldsRename lookup.previous_week, alias:previous_week
Kind regards, Philipp
15 Jun 2023 08:32 AM
Hey, Philipp
Thanks for quick response,
It worked for me. I am able to fetch metric for two different timeframe.
Regards,Amita