9 Replies Latest reply on Sep 21, 2016 7:09 AM by Samuel Gee

    Mixing agg and non-agg in IF statement

    Samuel Gee

      I have 1000 titles. I want to list the top 20 by sales, and aggregate the others into a single row that says "880 others".


      I have a set in the Title dimension, of the Top 20 by sales. It's called "Top 20".


      The following doesn't work, because the countd of title is an aggregate but nothing else is.


      If [Top 20] then [Title] else STR(COUNTD([Title]))+" Others"  END


      How do I achieve my "880 others" row?