COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: arvy_HL on 17 Jun 2020 05:37:08 AM

Title: Newbie Question: Sum Values Based on Filtered Data
Post by: arvy_HL on 17 Jun 2020 05:37:08 AM
Hi,

I am a newbie in Cognos Report Studio. The Date Value visible property set to No.
I have tables with data like this:

Part Number        Issued Qty          Date
123-4567             2                        10 Jun 2020
123-4567            2                       11 Jun 2020
  456-7890            1                         9 Jun 2020

expected results

Part Number        Issued Qty
123-4567             4       

  456-7890            1     

How can I group the Part and have the total QTY in issued Qty
Title: Re: Newbie Question: Sum Values Based on Filtered Data
Post by: bus_pass_man on 17 Jun 2020 10:31:03 AM
If you remove the date column from your report you should get the issued qty aggregated, assuming that the query item has had aggregation set on.

If you want the date column to be in your report then you need to understand that the results which you are seeing are correct and expected.

Title: Re: Newbie Question: Sum Values Based on Filtered Data
Post by: arvy_HL on 18 Jun 2020 02:24:22 AM
thank you for your reply,

I need the date just for filtering. Is there any other way to filter the date without having it in the report table?
Title: Re: Newbie Question: Sum Values Based on Filtered Data
Post by: bus_pass_man on 18 Jun 2020 06:10:26 AM
You can create a filter in FM, refresh your package, and drag the filter into the report or you can create a filter in the report.  One of the tabs in the filter dialog has all the objects in the package in a tree, which you can use to build up the expression you want.


You need to define what your requirements are.  Part of that entails understanding terminology.

Your question title uses the word 'filter' but your question asks and shows, in the expected results, a completely different requirement.

QuoteHow can I group the Part and have the total QTY in issued Qty
... is not immediately associated with the concept of filtering.

If I rely on your statement that you want this:
Part Number        Issued Qty
123-4567             4     

...then I must infer that you don't want to filter your report as 2 + 2 = 4.