1 Reply Latest reply on Mar 13, 2013 5:12 PM by Sasi Nagireddy

    TOPN filter on two combined cubes

    user6185307
      Hi guys,
      do you know how to apply a TOPN filter on two combined queries like the one below:

      SELECT saw_0, saw_1, saw_2 FROM ((SELECT Companies.Company saw_0, "Non Revenue Facts".Rooms saw_1, "Local Revenue Facts"."Room Revenue" saw_2 FROM COMPANY) UNION (SELECT "Travel Agent".Travel saw_0, "Non Revenue Facts".Rooms saw_1, "Local Revenue Facts"."Room Revenue" saw_2 FROM TRAVEL_AGENT)) t1 ORDER BY saw_1 DESC

      The filter should be this one WHERE TOPN("Non Revenue Facts".Rooms,10) <= 10)

      I tried to apply it on each query, but doesn't give the expected results.
      the filter should apply for both queries.

      Any idea?

      Thanks!