Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create bar chart that tracks the number of contracts that fit into a range of <$100K, $100K to $500K, $500 to $1M, $1M to $5M. How would I ensure that the order of the bars appear in that order? I thought I might use an alphabetical prefix for sorting like A) <$100K, B) $100K to $500K, C) $500 to $1M, D) $1M to $5M but this seems awkward if one or more categories is missing.
What would you advise?
You can use a dual and applymap function to add sorting.
Dual accepts a parameter for string and number for sort. See the sample code below using ApplyMap and Dual
TestMap:
Mapping
Load * Inline [
Value, SortNo
'<$100K', 10
'$100K to $500K',20
' $500 to $1M',30
'$1M to $5M', 40
] ;
You can now use applymap
Load * ,
Dual( YourFieldName, ApplyMap('TestMap', YourFieldName,0) as YourFieldName
from ... ;
Replace the YourFieldName with your field name from the dataset.
@skamath1 Thank you for your reply! I appreciate your comment and will take a look at it.