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

Data not displaying in pie chart (Active report)

Started by Neelam Bhatia, 30 Jun 2014 03:10:09 AM

Previous topic - Next topic

Neelam Bhatia

I have 1 requirement to show male/female count ratio in pie chart in Active report. i have gender field in my query.
for to achieve this i have created dataitem male and female.
1)expression defination of Male dataitem- if ( [Gender] ='male') then
([Employee ID] )
else (NULL)

2)expression defination of Female dataitem- if ( [Gender] ='Female') then
([Employee ID] )
else (NULL)

Then i created 2 more data items as Male count and Female count.
1) expression defination of Malecount dataitem-count(distinct[male])
2) expression defination of Femalecount dataitem-count(distinct[Female])

finally i added Malecount and Femalecount dataitems in  series of pie chart but iam getting No Data Available error.

Can someone please help me with this.




cognos_learning

#1
Hi,

try the following logic:

For Male dataitem-
if ( [Gender] ='male') then
distinct-count([Employee ID] and  [Employee ID] is not null )
else (NULL)

2)expression defination of Female dataitem- if ( [Gender] ='Female' and [Employee ID] is not null) then
distinct-count([Employee ID])
else (NULL)


Thanks
Kumar_CognosDeveloper

Ammus1234

Check the Aggregate function for the data items.

I may do it in a different way.

if ( [Gender] ='male') then
(1)
else (0)

then make the Aggregate function as Total

Satheesh

Hi,


1. Are you using any Category Axis...?


2. Can I Know what is Category Axis, Series, Measure...?


If you are using only Gender data Item..
Just do the following


Take a Query
1. Drag [Gender] Data item
2. Drag Data item from toolbox and type 1 click ok. Make the data type name Total. make Aggregation Function is Total.
3. Drag & Drop Pie Chart. Gender Data Item in Series and Total data item in Measure. in Chart properties Click on Show Value, Under Values Select Percentage.
4. Run




Thanks & Regards
Satheesh Chapparapu










weapamela

Hope you don't mind if I post on this discussion, I can't seem to find how to post a new topic.

I'm having similar issue, I'm using a data item like this one
total([Count measure] ) / total(total([Count measure]) )for report)

I'm trying to add this data item to a pie chart (which should display the % ), returns with 'no data'. 
If I remove the 'for report' returns with data (not the correct calculation but returns)

Suggestions, thanks and sorry to jump in on another post.

MFGF

Quote from: weapamela on 21 Feb 2018 01:23:52 PM
Hope you don't mind if I post on this discussion, I can't seem to find how to post a new topic.

Take a look at the FAQ post here - FAQ #3 gives you exact details on how to post a new topic.

Cheers!

MF.
Meep!