Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)))
In order to use Set Analysis you must use some sort of aggregation function (such as Sum).