KUSTO - Time Range parameter usage error

Haroun Bouhdid 1 Reputation point

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»
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;

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 Monitored
Not Monitored
Tag not monitored by Microsoft.
37,538 questions
0 comments No comments
{count} votes