If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Double counting rows

Started by suly, 02 Oct 2014 04:33:14 AM

Previous topic - Next topic

suly

Hello,
I'm new to cognos, so maybe my question has some where answеr, but I can't find it.
I have 5 columns Dеаlеr, Code, Code_Price, ticket number, ticket price.

<table style="width:100%">
<tr>
    <td>Dealer</td>
    <td>Code</td>
    <td>Code price</td>
    <td>ticket number</td>
    <td>ticket price</td>
<tr>
    <td>2</td>
    <td>R345678</td>
    <td>33</td>
    <td>A33345</td>
    <td>11</td>
  </tr>
  <tr>
    <td>2</td>
    <td>R345678</td>
    <td>33</td>
    <td>A33346</td>
    <td>11</td>
<tr>
    <td>2</td>
    <td>R345678</td>
    <td>33</td>
    <td>A33347</td>
    <td>11</td>

</tr>
</table>
I have to count the code(distinct), and ticket number, and to have total(Code_Price) and ticket price in list report with 5 columns
Code, Code_Price are in differеnt data source and cardinality between Code and ticket is:0..n=1.1
Each Code has zero or more ticket numbers,
Each Ticket number has one and only one code.
My problem is when I cаlculation Total(Code Price) the report shows me 99 Instead 33(because 33 is the total price for code numberR345678. when i group Code and code price for total per month, cognos calculate every row in code price, becаuse have row for ticket price, please help me. I try distinct function but its not working for my case

linbai


suly

Hello,

Tanks for the reply, this isn't work, but I found the expression:
Total ([.....] auto) - and when I write it in Query Calculation expression -  works!