Hi Priyanka,
what Patrick described is to add a query calculation to your report.
From the Insertable Objects click on toolbox. Under TEXTUAL you'll find Query calculation. Drag it into your report.

An expression editor will open: Give a meaningful name and add the calculation in the expression definition box.
Then either type in the calculation or choose from a list of various functions.
Look for the corresponding icon below Available Components. count() is listed under Summaries.

This is in general described here https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=calculations-insert-query-calculation
Best regards
------------------------------
Gertrud Lohwasser
------------------------------
Original Message:
Sent: Mon May 23, 2022 09:13 AM
From: Priyanka Joshi
Subject: please help with below report
How to find count I am still not getting.could you please guide
Code | Count | Amount |
6 | | 10 |
6 | | 20 |
5 | | 30 |
5 | | 40 |
5 | | 50 |
here code should be counted and grouped
result should be like
code | count | amount |
6 | 2 | 30 |
15 | 3 | 120 |
Original Message:
Sent: 5/19/2022 10:53:00 AM
From: Patrick Neveu
Subject: RE: please help with below report
Hi Priyanka,
You need to create a count query calculation that will use the following expression:
Count([Description] for [Code])
Best regards,
------------------------------
Patrick Neveu
Positive Thinking Company
Original Message:
Sent: Thu May 19, 2022 06:53 AM
From: Priyanka Joshi
Subject: please help with below report
I need report like below:
code | Description | Price | | | | | | | |
34 | abc | 12 | | | | | | | |
34 | abc | 30 | | | | | | | |
3 | xyz | 50 | | | | | | | |
3 | xyz | 50 | | | | | | | |
3 | xyz | 50 | | | | | | | |
| | | | | | | | | |
and I need output like below by taking count of code:gouped and ordered by code | :Count and Sum of each entry |
| | | | | | | | | |
code | count | description | price | | | | | | |
34 | 2 | abc | 42 | | | | | | |
3 | 3 | xyz | 150 | | | | | | |
| | | | | | | | |
please help me in how to count that code ....i have used count function but not working properly
------------------------------
Priyanka Joshi
------------------------------
#CognosAnalyticswithWatson