INTERACT FORUM

Please login or register.

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

Author Topic: Expression based categories can define separate grouping  (Read 1716 times)

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Expression based categories can define separate grouping
« on: August 17, 2013, 05:40:50 am »

Interesting.. Will this work on panes??

Thanks
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression based categories can define separate grouping
« Reply #1 on: August 17, 2013, 05:47:29 am »

Please elaborate....
Logged
The opinions I express represent my own folly.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Expression based categories can define separate grouping
« Reply #2 on: August 17, 2013, 12:00:24 pm »

For example a pane based on album artist using, GroupCount(...) that will count albums..

So the pane would display Artist (Count)

Similar to the variable expressions you helped me with that counts items within a category.. If possible this way would be much more efficient I imagine rather than using global variables..
Logged

Fabricio

  • Citizen of the Universe
  • *****
  • Posts: 685
  • No one has patience with me.
Re: Expression based categories can define separate grouping
« Reply #3 on: August 17, 2013, 02:00:45 pm »

Please, a picture ...

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression based categories can define separate grouping
« Reply #4 on: August 17, 2013, 02:44:10 pm »

I posted briefly about this in the Beta forum:

GroupCount() and GroupSummary() can be used ... in a Categories expression by using different expressions to group by and display.  For example:


Expression to group by:
[File Type]

Expression to display....
[File Type] /(GroupCount()/)

This would group by file types, but show you file types followed by the count of the given file type.
Logged
The opinions I express represent my own folly.

Fabricio

  • Citizen of the Universe
  • *****
  • Posts: 685
  • No one has patience with me.
Re: Expression based categories can define separate grouping
« Reply #5 on: August 17, 2013, 03:02:10 pm »

I understood.
Thank you.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Expression based categories can define separate grouping
« Reply #6 on: August 17, 2013, 10:45:06 pm »

Thanks :)
Logged

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Expression based categories can define separate grouping
« Reply #7 on: August 26, 2013, 11:01:39 am »

Been monkeying around with this, I can't for the life of me figure out how to sort by groupcount()

Expression to group by
[File Type]

Expression to display
GroupCount():/ [File Type]

So it would display like
250:Mp3
500:Flac

Instead it shows like
500:Flac
250:Mp3

Any ideas? I think it's I thought about also using groupcount in the group by field but no luck.. Is this a limitation?

Thanks
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression based categories can define separate grouping
« Reply #8 on: August 26, 2013, 12:12:37 pm »

I believe the Group* Functions don't have meaningful values until after the groupings have been created.

The "Expression to display..." is not the sort key, rather the "Expression to group by" is.  But if you place GroupCount() there, the values will all be 1 because the groupings have not yet been made.

I don't think you can use Group* yet in this fashion.
Logged
The opinions I express represent my own folly.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Expression based categories can define separate grouping
« Reply #9 on: August 26, 2013, 12:19:52 pm »

Thanks, hopefully this will be added, it's be a shame not being able to sort that way.

I wonder the reason groupcount can't be used in expression to group by.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression based categories can define separate grouping
« Reply #10 on: August 26, 2013, 12:27:49 pm »

My hunch is that the software that creates the groupings is at a lower level than the software that later counts those groupings.  Example pseudo-code:

   groupings_list = CreateCategories(current_category_expression)
   category_count_list = GroupCount(groupings_list)
Logged
The opinions I express represent my own folly.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Expression based categories can define separate grouping
« Reply #11 on: August 26, 2013, 12:44:46 pm »

so no real workaround without some tweaks.

Would it be possible to add a switch to groupcount, so if you used groupcount in expression to group by, it could add a temp marker later to be replaced by one extra routine that would recalculate the group by field with the replacing the temp markers with the counts from the expression to display.. Like that no major overhaul would be needed.. Maybe a bit sloppy but I can't think of any other logical way without redesign..
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression based categories can define separate grouping
« Reply #12 on: August 26, 2013, 01:32:10 pm »

The only current means is to use global variables as we've done in other examples.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up