question

HarounBouhdid-2685 avatar image
0 Votes"
HarounBouhdid-2685 asked karishmatiwari-msft edited

KUSTO - Time Range parameter usage error

Hello everyone,
Kusto Time Range parameter
Time Range parameter with type «Drop down» I have no problem. Everything works very well.
But when I use Time Range parameter with the type "Time range picker" the parameter {timeRange} does not accept any operator. And it blocks with the error «Query could not be parsed at '>' on line [5,16] Token: '>' Line: 5 Postion: 16»
Example:
1- Parameter "TimeRangeStatGeneraleCustom" of type "Time range picker"
2- Query:

let timerange = {TimeRangeStatGeneraleCustom}
let lenght = strlen(tostring(timerange));
let maxlenght = (lenght-9);
let nbrjour = substring(timerange,0,maxlenght);
let QMoyenneParjour = union pageViews, customEvents, requests
| where timestamp > ago(timerange)
and session_Id !=""
| summarize Nombre = bin(todouble(dcount(session_Id) / todouble(nbrjour)),0.01)

//| summarize Nombre=count(session_Id)
| extend Description = strcat("Moyenne des sessions par jour (sur"," ", nbrjour," ","jours)")
//| extend Metrique = "Session"
| extend Ordre =2
| project-reorder Description;
//----------------------------------
let ExecuteQuery = QMoyenneParjour;
ExecuteQuery;

3- Erreur:
Query could not be parsed at '>' on line [5,16] Token: '>' Line: 5 Postion: 16

Do you have a solution please Thank you.

not-supported-azure
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers