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

add Percentage row under Union list report

Started by peewan, 20 Dec 2019 09:25:02 AM

Previous topic - Next topic

peewan

I have the list report is union of 2 queries

Query 1:
Name '#of membership'
Measure: total all membership [ID]

Query 2:
Name "#of member had visit"
Measure: total all memberVisit ID

Report: union of 1 and 2.
outcome:
       NAME                      MEASURE
#of member had visit        8
#of membership               16


I would like to add Percentage under it which 8/16= 50%
How could I do that? Thank you

Andrei I

Reading product documentation usually helps :-)

oscarca

What happens if you just divide the two data items #of member had visit / #of membership ?

peewan

Quote from: oscarca on 20 Dec 2019 12:29:54 PM
What happens if you just divide the two data items #of member had visit / #of membership ?

that not 2 different data items.
"#of member had visit" and  "#of membership" is the NAME in data item "GROUP NAME", and the value is in "Measure" data item.

basically, i just have 2 data items: Group, and Measure

oscarca

#4
I believe you can do this in two ways:

Example 1 "Join"
Query1= Company, Netline amount 2017 (Detailed filter Year = 2017)
Query2= Company, Netline amount 2018 (Detailed filter Year = 2018)
Final(Join between Query1 and Query2 by joining on Company)

Example 1 "Union"
Query1= Company, Netline amount 2017, Netline amount 2018 (0) (Detailed filter Year = 2017)
in Query1 you create an empty data item Calling it Netline amount 2018 so we can union on it.

Query2= Company,Netline amount 2017 (0) Netline amount 2018 (Detailed filter Year = 2018)
in Query2 you create an empty data item Calling it Netline amount 2017 so we can union on it.

Final: Create a new Query and union with Query1 and query2 and then create a new data item "Netline amount 2018/Netline amount 2017" to get the percentage.
Note that it is important to set Detail Aggregation to "Total" on the two data items "Netline amount 2018" and "Netline amount 2017". Otherwise you will get two rows instead of one.

Best regards,
Oscar

peewan

Quote from: oscarca on 27 Dec 2019 08:31:23 AM
I believe you can do this in two ways:

Example 1 "Join"
Query1= Company, Netline amount 2017 (Detailed filter Year = 2017)
Query2= Company, Netline amount 2018 (Detailed filter Year = 2018)
Final(Join between Query1 and Query2 by joining on Company)

Example 1 "Union"
Query1= Company, Netline amount 2017, Netline amount 2018 (0) (Detailed filter Year = 2017)
in Query1 you create an empty data item Calling it Netline amount 2018 so we can union on it.

Query2= Company,Netline amount 2017 (0) Netline amount 2018 (Detailed filter Year = 2018)
in Query2 you create an empty data item Calling it Netline amount 2017 so we can union on it.

Final: Create a new Query and union with Query1 and query2 and then create a new data item "Netline amount 2018/Netline amount 2017" to get the percentage.
Note that it is important to set Detail Aggregation to "Total" on the two data items "Netline amount 2018" and "Netline amount 2017". Otherwise you will get two rows instead of one.

Best regards,
Oscar


Example1: Join - I easy to do new data item [Percence] = ([Netline amount 2017]/[Netline amount 2018] because it is 2 different data items.

I really want to do example 2: UNION

Union query just had 2 data item: [Company], and [Netline amount] (will be Netline amount 2017 or Netline amount 2018)
and created [new data item] = what? ( =Netline amount 2017/Netline amount 2018 is not work)

Thanks