INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: gross revenue doesn't sort correctly  (Read 1504 times)

tcman41

  • Citizen of the Universe
  • *****
  • Posts: 563
  • Sound Surfing!
gross revenue doesn't sort correctly
« on: March 16, 2012, 03:34:08 pm »

I have 170 1080P MKV movies under my movies tab, I went and hit the get tv & movie info for each of my movies and saved the data, I believe it resides in the sidecar file.

Under each of my movies one of my thumbnaill text lines is 'gross revenue', I also have 'gross revenue' as a column in panes.

When i go to sort my movies by 'gross revenue' it doesn't do it properly, is that because the info is in a sidecar file or is it because there is a dollar sign in front of each of the 'gross revenue' figures.

can anyone shed some light on this?

thanks
 T to the C  8)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: gross revenue doesn't sort correctly
« Reply #1 on: March 16, 2012, 03:47:10 pm »

The Gross Revenue field is just a "string" (a sequence of ASCII characters), so it will sort in character sequence order.

Unless there are changes to make this an integer (and this would likely be an issue, since there would be no currency indicator), you'll probably have to force sorting by manipulating the field via expression to be a number.  If you want to do this, can you share a few exact values for Gross Revenue? (I don't have any).
Logged
The opinions I express represent my own folly.

tcman41

  • Citizen of the Universe
  • *****
  • Posts: 563
  • Sound Surfing!
Re: gross revenue doesn't sort correctly
« Reply #2 on: March 16, 2012, 06:38:35 pm »

The Gross Revenue field is just a "string" (a sequence of ASCII characters), so it will sort in character sequence order.

Unless there are changes to make this an integer (and this would likely be an issue, since there would be no currency indicator), you'll probably have to force sorting by manipulating the field via expression to be a number.  If you want to do this, can you share a few exact values for Gross Revenue? (I don't have any).

Inception - 2010
Revenue = $825,532,764

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: gross revenue doesn't sort correctly
« Reply #3 on: March 16, 2012, 07:06:23 pm »

Try an expression column instead:

  If(isempty([Gross Revenue]), Unassigned, $RemoveCharacters([Gross Revenue], /,$))

This won't have thousands commas though.
Logged
The opinions I express represent my own folly.

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: gross revenue doesn't sort correctly
« Reply #4 on: March 17, 2012, 03:45:22 am »

Inception - 2010
Revenue = $825,532,764



So sad.  that bums me out.
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42046
  • Shoes gone again!
Re: gross revenue doesn't sort correctly
« Reply #5 on: March 17, 2012, 08:59:29 am »

Our string sorting system has smart number handling.

I wonder if it just doesn't like the commas?  Are you in a locale where comma means decimal?
Logged
Matt Ashland, JRiver Media Center

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: gross revenue doesn't sort correctly
« Reply #6 on: March 17, 2012, 12:05:22 pm »

@Matt: FYI - I originally only removed the $ and allowed the commas to remain, but the sorting was incorrect.  I had to remove the commas in the expression for tcman41.
Logged
The opinions I express represent my own folly.

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42046
  • Shoes gone again!
Re: gross revenue doesn't sort correctly
« Reply #7 on: March 20, 2012, 11:52:31 am »

This one is deceptively tricky.

The ambiguity between , and . as the decimal makes it hard to support either reliably.

And then, often dots are used as delimiters in downloaded filenames so assuming the dots mean "treat as a decimal number" for sorting could lead to other issues.
Logged
Matt Ashland, JRiver Media Center

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: gross revenue doesn't sort correctly
« Reply #8 on: March 20, 2012, 02:56:00 pm »

Would it be possible to check if the string to sort contains only digits and . or ,? I guess there would not be many filenames that include only digits (at lest if the extension is included in the file name).
Logged
Pages: [1]   Go Up