Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Folks,
I have a map showing values by UK Postcode (area or district depending on selections). A few of my values are very big, and then fall away sharply, so I don't really want to use the standard sequential classes as the middle isn't really used.
I have created an expression for colouring like so (choice of two metrics - lives or sum assured), but I have hard coded the boundaries:
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<10000000,rgb(255,255,204),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<50000000,rgb(255,237,160),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<100000000,rgb(254,217,118),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<500000000,rgb(254,178,76),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<1000000000,rgb(253,141,60),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<5000000000,rgb(252,78,42),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<10000000000,rgb(227,26,28),
if(if([Metric]='Lives',sum([LIVES]),sum([TSA]))<25000000000,rgb(189,0,38),rgb(128,0,38)
))))))))
What I really want to do is set the boundaries as a % of the highest amount in a postcode. Everytime I try something it calculates the maximum for THAT particular postcode and therefor sets the colour based on 100% of the maximum.
Any ideas?
Many thanks in advance for the help.
Cheers
Chris
Ok, then replace the hardcoded values with a % multiplied by the max:
0.2 * $(=max(aggr(sum( ...), Dim1, Dim2, ..., DimN)))
Replace Dim1, Dim2, ..., DimN with whatever dimensions the sum should be aggregated over.
Ok, then replace the hardcoded values with a % multiplied by the max:
0.2 * $(=max(aggr(sum( ...), Dim1, Dim2, ..., DimN)))
Replace Dim1, Dim2, ..., DimN with whatever dimensions the sum should be aggregated over.
Many thanks - that works a treat....
Cheers
Chris