Skip to main content

Custom Fields - Adding Power and Flexibility to your Analytics

  • February 22, 2022
  • 5 replies
  • 238 views

DavidSchwindt
Mark43 Team Member
Forum|alt.badge.img

Custom Fields are a very powerful and flexible feature in analytics. You will find Custom Fields as the top category in your Explorers, if it is enabled for your agency. If you don’t see Custom Fields, reach out to Mark43 Support and ask to have Custom Fields enabled in Analytics for you.

 

Screenshot of the Custom Fields category in Analytics

Expand the Custom Fields category by clicking on it. The first time you will see a message reading “This Explore has no custom fields yet”. 

 

Screenshot of the expanded Custom Fields category in Analytics

Click the [NEW] button to see the types of fields you can create.

 

Screenshot of the New Custom Fields flyout menu in Analytics

In the following example, you will see Full AddressStreet Number, and Street Name displayed.

 

Screenshot showing the Full Address, Street Number, and Street Name dimensions in Analytics

You may want a dimension with just the Street Number and Street Name combined, but without the city, state, postal code, and country information. We can do that with a Custom Dimension.

Click on Custom Fields - NEW - Custom Dimension and enter the following:

 

 

The concat() function allows us to combine strings from other dimensions into our custom dimension. In this case we are combining the Street Number, a space, and the Street Name. When you click [Save] this dimension, named Location Address, will be saved in the Custom Fields category and it will be added to your DATA pane. Click [Run] to see the results.

 

 

This topic has been closed for replies.

5 replies

  • Novice I
  • April 13, 2022

Hello - Very interesting, however I do not have Custom Fields in my instance of Looker, has this feature been rolled out across Mark 43? 


Hi @ed_wells ,

 

Long time, not talk! Hope you are doing well down there! This is a permission that I had to get added to my profile initially. I bet Chuck @chuck.morgandale could help get you to the right person. 


@DavidSchwindt 

 

I have done this same thing to overcome so many formatting issues with our locations improper storage of discrete data elements within the wrong fields as prefixes/suffixes. Our command often want to know what the “top locations” are for crime. They often desire a list of situs addresses within districts, but it can be difficult to provide when the data is inconsistently stored and formatted. 

 

Here is a custom dimension for “Situs” addresses that looks to the offense_street_name field to removed erroneous storage of Apartment numbers (sub_premise) fields within this field. I won’t go into explicit detail here, but it performs a search on the street_name field and removes any apartment suffixes and combines intersections into a a single dimension. 

 

I’m not sure if other agencies have this issue, but it may be helpful to those that do. 

 

if(
  
  is_null(
    if(is_null(${vw_report_offenses.offense_location_street_name}) = no,
 
  
concat(${vw_report_offenses.offense_location_street_number}," ",if(

position(${vw_report_offenses.offense_location_street_name}, " APT ")

> 0

,

substring(${vw_report_offenses.offense_location_street_name}
  ,1
  ,position(${vw_report_offenses.offense_location_street_name}, " APT ")-1)

${vw_report_offenses.offense_location_street_name}

))

  concat(${vw_report_offenses.offense_location_cross_street_1}, " & ",${vw_report_offenses.offense_location_cross_street_2})


)

)
=yes
,
${vw_report_offenses.offense_location_street_name}
,
if(is_null(${vw_report_offenses.offense_location_street_name}) = no,
 
  
concat(${vw_report_offenses.offense_location_street_number}," ",if(

position(${vw_report_offenses.offense_location_street_name}, " APT ")

> 0

,

substring(${vw_report_offenses.offense_location_street_name}
  ,1
  ,position(${vw_report_offenses.offense_location_street_name}, " APT ")-1)

${vw_report_offenses.offense_location_street_name}

))

  concat(${vw_report_offenses.offense_location_cross_street_1}," & ",${vw_report_offenses.offense_location_cross_street_2})


)

)


DavidSchwindt
Mark43 Team Member
Forum|alt.badge.img
  • Author
  • Mark43 Team Member
  • April 13, 2022

Hello - Very interesting, however I do not have Custom Fields in my instance of Looker, has this feature been rolled out across Mark 43? 

 @ed_wells Reach out to support@mark43.com and they can get Custom Fields enabled for you.


  • Novice I
  • April 13, 2022

Hello - Very interesting, however I do not have Custom Fields in my instance of Looker, has this feature been rolled out across Mark 43? 

 @ed_wells Reach out to support@mark43.com and they can get Custom Fields enabled for you.

Thank you- in my defense I’m very tired today….