5 Replies Latest reply on Sep 5, 2017 12:24 PM by Sarhad Arisdakessian

    Calculate the total Number of fields Per year

    Sarhad Arisdakessian
      idoriginal_titlerelease_yeargenres1genres2genres3
      135397Jurassic World2015ActionAdventureScience Fiction
      76341Mad Max: Fury Road2010ActionAdventureScience Fiction
      262500Insurgent2012AdventureScience FictionThriller
      140607Star Wars: The Force Awakens2011ActionAdventureScience Fiction
      168259Furious 72015ActionCrimeThriller

                                                                                                                                                                                                                      

      idoriginal_titlerelease_yeargenres1genres2genres3genres4genres5
      135397Jurassic World2015ActionAdventureScience FictionThrillerNULL
      76341Mad Max: Fury Road2015ActionAdventureScience FictionThrillerNULL
      262500Insurgent2015AdventureScience FictionThrillerNULLNULL
      140607Star Wars: The Force Awakens2015ActionAdventureScience FictionFantasyNULL
      168259Furious 72015ActionCrimeThrillerNULLNULL
      281957The Revenant2015WesternDramaAdventureThrillerNULL
      87101Terminator Genisys2015Science FictionActionThrillerAdventureNULL
      286217The Martian2015DramaAdventureScience FictionNULLNULL
      211672Minions2015FamilyAnimationAdventureComedyNULL
      150540Inside Out2015ComedyAnimationFamilyNULLNULL
      206647Spectre2015ActionAdventureCrimeNULLNULL
      76757Jupiter Ascending2015Science FictionFantasyActionAdventureNULL

       

      I have the above table in CSV format (actual table is much longer) that I am opening in Tableau.

      My target is, getting the number of genres productions per year. For example, 2015 = 34 Action Movie, 32 Adventure, 20 Thriller, etc...

       

      However, since each movie has several genres, thus there are several fields for genres for each movie.

      I have transformed the genres (3 of them) from Dimensions to Discrete values, and I am getting the COUNT for the genres, thus I can know that in a certain year, I had those genres with their numbers. However, this only happens for genres1, and genres2 etc separately.

       

      I want to aggregate them together.

       

      Is there anyway this can be done in tableau or I should do it using a different program?