How to apply function field on a report

Alon Grod
Tera Expert

Hi,

I created a Report that should show a single score in percentage. I configured this function field (added in attachment) but for some reason Im still getting the count and not the percentage using the function. Why the function field is not applied on the data?


 

1 ACCEPTED SOLUTION

mattystern
Kilo Sage

Hi @Alon Grod 

 

Might be a data typing issue? I have this working in this format:

 

EX:

Incident #DescriptionUseru_calls_answered_within_20_secondsu_calls_answered_between_20_30_secondsu_number_of_calls_answered
INC0385170Can't loginBob Test1 1
INC0385169Adobe not workingGuest 11
INC0385168No EmailTim Test1 1
INC0385167No EmailTim Test  1

 

Note - you result here will always be 1 or 0 in your function field. (1+0) / 1, (0+1) / 1, or (0+0) / 1.

 

Result: I have 20/67 (0.2985) records populated with either within 20 second or between 20-30 seconds in this PD and I have it rounding to 2.99:

mattystern_0-1695916298373.png

 

mattystern_1-1695916344596.png

mattystern_2-1695916357837.png

 

I realize my example has (I am sure) overly-simplified the data, but unfortunately, adding much more complexity will likely yield unfavorable results. Many of the function fields I have setup are more similar to the example on the product documentation. More reading about function fields can be found from the product documentation. 

 

I hope this helps!

 

-Matt

View solution in original post

3 REPLIES 3

mattystern
Kilo Sage

Hi @Alon Grod 

 

Might be a data typing issue? I have this working in this format:

 

EX:

Incident #DescriptionUseru_calls_answered_within_20_secondsu_calls_answered_between_20_30_secondsu_number_of_calls_answered
INC0385170Can't loginBob Test1 1
INC0385169Adobe not workingGuest 11
INC0385168No EmailTim Test1 1
INC0385167No EmailTim Test  1

 

Note - you result here will always be 1 or 0 in your function field. (1+0) / 1, (0+1) / 1, or (0+0) / 1.

 

Result: I have 20/67 (0.2985) records populated with either within 20 second or between 20-30 seconds in this PD and I have it rounding to 2.99:

mattystern_0-1695916298373.png

 

mattystern_1-1695916344596.png

mattystern_2-1695916357837.png

 

I realize my example has (I am sure) overly-simplified the data, but unfortunately, adding much more complexity will likely yield unfavorable results. Many of the function fields I have setup are more similar to the example on the product documentation. More reading about function fields can be found from the product documentation. 

 

I hope this helps!

 

-Matt

@mattystern what did you put for the aggregation? you must choose type of aggregation, can you please show this as well? thanks for the help btw

@Alon Grod I have this as "average" of the created function field "avg" - see the left of the 0.299 screenshot.

 

No problem! I could also benefit from how the data is showing on your end - I just used 1 or 0 as a decimal value on my fields. Are these decimal fields, floats, or some other data type?

 

-Matt