Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 02:22 AM

    Through this query, I am able to view revenue recorded by each customer.





    It will help to figure out how to apply maximum function so that the customer name with maximum revenue only shows.



    ------------------------------
    Rajeev Bagra
    ------------------------------


  • 2.  RE: How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 03:56 AM

    You probably want a filter with something like [Revenue] = max([Revenue] for report)



    ------------------------------
    Chris Turner
    ------------------------------



  • 3.  RE: How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 09:34 AM
      |   view attached


    ------------------------------
    Rajeev Bagra
    ------------------------------



  • 4.  RE: How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 09:46 AM

    Do I need to use SQL option and enter:

    [Revenue] = max([Revenue] for report

    Where should I enter the above. It will help to know the sequence starting from Report.



    ------------------------------
    Rajeev Bagra
    ------------------------------



  • 5.  RE: How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 10:07 AM


    Finally I could filter the customer with maximum revenue.



    ------------------------------
    Rajeev Bagra
    ------------------------------



  • 6.  RE: How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 12:00 PM

    Hi Rajeeva,

    If I understood your need correctly, you must use the RANK function. For example: RANK( [Revenue CY] AT [ShipToCustomer_CD] )

    Let me know.

    Giovanni



    ------------------------------
    Giovanni Mazzucato
    ------------------------------



  • 7.  RE: How to apply maximum function so that the customer name with maximum revenue only shows

    Posted Wed April 12, 2023 12:32 PM
    You may also add a custom item to your query calculated as maximum([revenue] for [something all the data shares in your dataset like FY or something]). Then add a filter to say [your max field] = [revenue]. Note that if two customers have the same revenue then they will both show.

    Logan Whitaker

    PMO, HEB Supply Chain Planning & Operations

    o: 210.938.6043 m: 210.429.3181

    e: whitaker.logan@heb.com