Monday, December 24, 2018

Super Heroes - Marvel Vs DC:Working with non-numeric data and the COUNTROWS function

Continuing with the previous data set of super heroes, the first thing I notice is that the data is just text. Only the height and weight columns are numeric. It wouldn't be that easy a data set to work with, especially since I am mainly used to working with numeric data sets. Anyways, I will just move forward and see what best I can do.

So the first thing that comes to my mind, as the title suggest, is the count of Marvel and DC super heroes. The first thing I will do is write a measure to calculate the number of rows. I will use a COUNTROWS function to do this:

Rows_count = COUNTROWS(heroes_information)

Now I will just just select the table format and tick on the Rows_count measure I just created and notice that I have 734 rows in the data. I will then add Publisher to the data and re-arrange the levels to get this:


Out of this, I only want the Marvel and DC superheroes, so I will go ahead and filter this:

This is the resulting table I get:


The two publishers contribute to 82.15% of the superheroes in the data set.

No comments:

Post a Comment