Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Top 'N' rows in crosstab

    Posted 07/12/19 04:55 AM
    Hi All,

    I am trying to display Top 5 rows in each group of crosstab but it is not working for me. I used rank() by following this link https://www-01.ibm.com/support/docview.wss?uid=swg21457327 but this doesn't seem to work. 
    Can you help me find a solution for displaying top 5 rows in each group of crosstab, like in below case - only highlighted rows should be displayed since they are top 5 rows in its group:
    Count of Product Sub-Type   Year Month      
        2019        
    Product type Product Sub-type Jan Feb Mar Apr May Total
    A A.11 6 12 11 7   36
      A.2 9 10 8 6 2 35
      A.42 30 31 19 22 6 108
      A.4 13 7 10 5 7 42
      A.15 2 4 10 2 3 21
      A.6 25 18 17 8 4 72
      A.7 27 8 11 4 4 54
      A2.8 3 12 2 4 3 24
      A.9 21 9 6 6 2 44
      A.11 7 4 7 2 5 25
    A Total   97 115 101 66 36 415
    B B.1 5 3 2 4 4 18
      B.34 11 24 17 17 22 91
      B.13 3 5 3   3 14
      B.44 2 1 4 1 8 16
      B.14 9 15 10 10 17 61
      B.8 4 5 3 3 1 16
      B17 5 4 4 3 5 21
      B.78 1 4 6 7 5 23
      B.12 21 7 12 12 4 56
      B.3 5 4 3 3 2 17
    B Total   56 50 64 60 71 301

    Kindly help!!

    ------------------------------
    K P
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Top 'N' rows in crosstab

    Posted 07/15/19 04:27 AM
    Try this filter function:
    rank ([Count of Product] desc for [Product type]) <= 5
    Als, set the Application property of the filter to After Auto Aggregation

    ------------------------------
    Daan Lambrechts
    ------------------------------