Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
oskar
Employee
Employee

The most occuring value in a selection

The dataset contains data from spotify, with artistName and trackName repeating itself each time they are played. 

I want to make a master item that looks for the most occuring artistName. Let's say BROCKHAMPTON is the most occuring artistName, and occurs 120 times, then I want "BROCKHAMPTON" to be displayed, but if I select a time period of 1 week Loyle carner occurs 10 times and is the most occuring, and then I want it to display "Loyle carner".

Have tried looking into FirstSortedValue and similar functions but I cannot make any sense of it. Hopefully someone with more experience could help me on the right track. Thanks

oskar_0-1640688463842.png

 

Labels (2)
2 Replies
qlikeers
Creator II
Creator II

You are looking for the maximum value from the [msPlayed] field for a given period, right? I can suggest that you create a master calendar, where the key will be the day; it should have fields -> Day, Week, Month, Quarter, Year ... or how you want to divide it.

Then you are looking for the maximum value of the [msPlayed] field, which will depend on the selection (the selected field from the master calendar)...if I understood the idea correctly.

oskar
Employee
Employee
Author

Thank you, is there any automated way to create the master calendar?