Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » counting distinct items of a column and put it into computed column(data loaded from csv file - need count distinct item from a column)
counting distinct items of a column and put it into computed column [message #1083484] Sat, 10 August 2013 02:09 Go to next message
Bonny Fog is currently offline Bonny FogFriend
Messages: 11
Registered: August 2009
Junior Member
Hi,

I am new to BIRT. I have loaded a csv file that has a column that contains city names.
I want the report to contain how many times each city name has showed up in the column like the following:

Original table
City
-----
New York
Washington
Toronto
Paris
Paris
Washington

Report table
City Number
----- ------
Paris 2
Washington 2
Toronto 1
New York 1

Since the data is loaded from CSV file the Query option is not visible. Any suggestion to do it will be appreciated.

Thanks
Re: counting distinct items of a column and put it into computed column [message #1083562 is a reply to message #1083484] Sat, 10 August 2013 05:14 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

If you group the table by city, you can remove the detail row and drag an aggregation from the palette to the group header and use the count aggregation function to give you the count for each group.

Hope this helps!


Michael

Developer Evangelist, Silanis
Re: counting distinct items of a column and put it into computed column [message #1083808 is a reply to message #1083562] Sat, 10 August 2013 14:35 Go to previous messageGo to next message
Bonny Fog is currently offline Bonny FogFriend
Messages: 11
Registered: August 2009
Junior Member
Thanks Michael. It works.
Re: counting distinct items of a column and put it into computed column [message #1083847 is a reply to message #1083808] Sat, 10 August 2013 15:58 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Great! Glad to help!

Michael

Developer Evangelist, Silanis
Re: counting distinct items of a column and put it into computed column [message #1728889 is a reply to message #1083847] Fri, 08 April 2016 09:24 Go to previous messageGo to next message
Kunco Laksmono is currently offline Kunco LaksmonoFriend
Messages: 1
Registered: April 2016
Junior Member
Hallo friends,

how to count total city

Data

New York
Washington
Toronto
Paris
Paris
Washington

Design report

City Total
Paris 2
Washington 2
Toronto 1
New York 1

with computed columns ?

Please help me Sad
Re: counting distinct items of a column and put it into computed column [message #1805581 is a reply to message #1083562] Wed, 17 April 2019 18:32 Go to previous message
Matheus Almeida is currently offline Matheus AlmeidaFriend
Messages: 1
Registered: April 2019
Junior Member
Michael Williams wrote on Sat, 10 August 2013 05:14
If you group the table by city, you can remove the detail row and drag an aggregation from the palette to the group header and use the count aggregation function to give you the count for each group.

Hope this helps!


I can't understand you when you write "add aggregation from the palette" and I can't use count aggregation in group function, can you help me?
Previous Topic:Denormalizing Data in a Report
Next Topic:BIRT reports and GitHub
Goto Forum:
  


Current Time: Thu Nov 14 13:42:09 GMT 2019

Powered by FUDForum. Page generated in 0.02175 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top