Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

'Trend By' variable in reporting

ssemmens
Tera Contributor

Hi all,

 

I'm trying to set up a report (Trend or Column) to trend by a variable that's set as a date/time type, but I don't seem to be able to select Variables in the Trend By dropdown in the way I can in the Group By column. Also, looking at the variable itself, it seems to be stored as text despite being date/time type, so I'm not sure this could ever work to begin with. 

 

(The variable is a 'start time' for a specific support ticket, and I want to trend by days of the week).


Does anyone have any history with this sort of thing? Is there any way to do this? 

Cheers.

1 ACCEPTED SOLUTION

AnveshKumar M
Tera Sage
Tera Sage

Hi @ssemmens / @Community Alums ,

I did some work on this, what I found is,

  •  All the variables values are stored in the tables as string only.
  • Trend By field accepts only Date, Date/Time fields.

As the variables store their value as String you can not select them in Tend By.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

View solution in original post

9 REPLIES 9

It's the sc_task table. I can access the variables via 'group by' so the table can definitely access them, the 'trend by' option just doesn't let me select variables at all.

Community Alums
Not applicable

I have the exactly the same problem. There are no options for Variable/Questions to choose from in the Trend by option in the report. How can we trend by record producer variables? Probably not possible. But lets see if anyone knows.

AnveshKumar M
Tera Sage
Tera Sage

Hi @ssemmens / @Community Alums ,

I did some work on this, what I found is,

  •  All the variables values are stored in the tables as string only.
  • Trend By field accepts only Date, Date/Time fields.

As the variables store their value as String you can not select them in Tend By.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

Thank you! I wonder if SN would be willing to make some changes down the line to support this and save variables as other types (since they do have a 'type' field but apparently it does nothing and saves as a string anyway). In the meantime I'll just have to adjust my plans. 

Thanks again.

Yeah that would be good if they find a way out for this. 👍

Thanks,
Anvesh