Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Expression giving no data

I  have an expression in a gauge chart (I am using sets to gather the info).  It is giving no data to display.  Essentially, I am trying to let the user select two years and find the percentage change in total highway fatalities between the two years.  When I go to the expression in the Properties for the chart it does not like my first bracket  '{' (i.e. it has a red squiggly line under it).  Any ideas why this is occurring?  FYI, I cannot use the 'Sum' function as the number of fatalities is already summed by type of road and year.  The code is below.

= (((({$<Year = {$(=Max(Year))}>} Insterstate_Urban_Fatality) + ({$<Year = {$(=Max(Year))}>} Interstate_Rural_Fatality) + ({$<Year = {$(=Max(Year))}>} Local_Rural_Fatality) +

  ({$<Year = {
$(=Max(Year))}>} Local_Urban_Fatality) + ({$<Year = {$(=Max(Year))}>} Major_Arterial_Rural_Fatality) + ({$<Year = {$(=Max(Year))}>} Major_Urban_Collector_Fatality) +

  ({$<Year = {
$(=Max(Year))}>} Minor_Arterial_Rural_Fatality) + ({$<Year = {$(=Max(Year))}>} Minor_Arterial_Urban_Fatality) +

  ({$<Year = {
$(=Max(Year))}>} Minor_Collector_Rural_Fatality) + ({$<Year = {$(=Max(Year))}>} [Other Freeways and Expressways Urban Fatality]) +

  ({$<Year = {
$(=Max(Year))}>} Other_Principal_Arterial_Rural_Fatality) + ({$<Year = {$(=Max(Year))}>} Other_Principal_Arterial_Urban_Fatality) +

  ({$<Year = {
$(=Max(Year))}>} Unknown))



-



(({$<Year = {
$(=Min(Year))}>} Insterstate_Urban_Fatality) + ({$<Year = {$(=Min(Year))}>} Interstate_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Local_Rural_Fatality) +

({$<Year = {
$(=Min(Year))}>} Local_Urban_Fatality) + ({$<Year = {$(=Min(Year))}>} Major_Arterial_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Major_Urban_Collector_Fatality) +

({$<Year = {
$(=Min(Year))}>} Minor_Arterial_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Minor_Arterial_Urban_Fatality) +

({$<Year = {
$(=Min(Year))}>} Minor_Collector_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} [Other Freeways and Expressways Urban Fatality]) +

({$<Year = {
$(=Min(Year))}>} Other_Principal_Arterial_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Other_Principal_Arterial_Urban_Fatality) +

({$<Year = {
$(=Min(Year))}>} Unknown)))





/



(({$<Year = {
$(=Min(Year))}>} Insterstate_Urban_Fatality) + ({$<Year = {$(=Min(Year))}>} Interstate_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Local_Rural_Fatality) +

({$<Year = {
$(=Min(Year))}>} Local_Urban_Fatality) + ({$<Year = {$(=Min(Year))}>} Major_Arterial_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Major_Urban_Collector_Fatality) +

({$<Year = {
$(=Min(Year))}>} Minor_Arterial_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Minor_Arterial_Urban_Fatality) +

({$<Year = {
$(=Min(Year))}>} Minor_Collector_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} [Other Freeways and Expressways Urban Fatality]) +

({$<Year = {
$(=Min(Year))}>} Other_Principal_Arterial_Rural_Fatality) + ({$<Year = {$(=Min(Year))}>} Other_Principal_Arterial_Urban_Fatality) +

({$<Year = {
$(=Min(Year))}>} Unknown)))

  

1 Reply
Josh_Good
Employee
Employee

In order to use Set Analysis you must use some sort of aggregation function (such as Sum).