How to skip nulls in rank and window?

I have a dataflow that is joining multiple datasets with information about a set of schools - 29 elementary schools and 3 high schools. One of the data sets is specific to tests scores that only the elementary schools take, so the high school rows are "null."

This dataflow that I am creating aims to generate separate rankings for each of the different categories joined together. In all other cases, the rankings are fine for all 32 schools. In the case of the test scores, the nulls are being counted in the rankings.

I need all 32 rows present in the output dataset, but just don't want those three high school rows with a rank for that specific column.

How can I skip those "nulls" in the ranking?

Thanks!

Tagged:

Answers

  • ST_Superman
    ST_Superman Domo Employee

    You could try using a beastmode, something like

    case when `SchoolType`='High School' then null else `TestScoreRank` end
    
  • @elizab Are you able to rank the elementary test scores prior to joining to the rest of the schools so that the nulls are not included when ranking?