INTERACT FORUM

Please login or register.

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

Author Topic: I need an Expression for the dominant artist on an album  (Read 980 times)

bytestar

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1286
  • Alpha/Betatester
I need an Expression for the dominant artist on an album
« on: May 26, 2012, 10:30:47 am »

I am looking for an expression thats outpout the dominant artist on albums.
The artist who appears on the most tracks on an album, when several artists are involved in different tracks.


Logged
Official Microsoft © product tester.
Download the latest language file https://1drv.ms/u/s!AnQ3L_bTnnzv4otXL9-G4rUj9wX6Tw?e=TLGgjb (is constantly updated)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: I need an Expression for the dominant artist on an album
« Reply #1 on: May 26, 2012, 11:46:35 am »

It is not clear to me that this can be done generally, since a list of artists may contain any number of individual artists, and there is no means to iterate through the list of items.

You could handle up to N artists, and use the new global variable functions to create/increment a unique per album-artist variable each time it is seen in your artist list.  The expression would test the number of items in the list and increment the album-artist var, and also save the artist name in an album-artist-max value, updating this value with each increment when appropriate.  It will be ugly.
Logged
The opinions I express represent my own folly.

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: I need an Expression for the dominant artist on an album
« Reply #2 on: May 26, 2012, 11:59:46 am »

A manual way to do this is to create a categories view with first Album and then Artist and display the Artist level as a list with a Track # column that the list is sorted by.
Logged
Pages: [1]   Go Up