Author |
Message |
Nav522
Senior Member
Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
|
Topic: Getting only specific trnasactions for each group Posted: 18 Jul 2017 at 4:52am |
Hello Good day.
I'm trying to figure out a way to bring in only specific groups that has specific transactions (MA,CPK)any other transactions then suppress the whole group. How to achieve this?
Sample Data:
Source TRX POLICY
GH1 1 MA 123
GH1 2 MA 345
GH1 2 CPK 345
GH1 3 NA 456
I only want to see this as Output and suppress the rest
Source TRX POLICY
GH1 2 MA 345
GH1 2 CPK 345
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 18 Jul 2017 at 9:32am |
Not entirely sure what you are trying to do but you can consider creating a formula field to 'flag' specific rows then use that result in a group summary and the group summary to do a group select criteria or group suppression
//@flag example
if table.field IN ['MA','CPK'] then 1 else 0
group select example
SUM(@flag,table.groupfield) = 0
|
IP Logged |
|
Nav522
Senior Member
Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
|
Posted: 18 Jul 2017 at 10:16am |
Hello there thanks for your response.
I created a flag formula and in the Selection Formula I did included the
SUM(@flag,table.groupfield) = 0
The report comes up as blank. I did notice I have a filter in the record selection as table.field = ['MA','CPK']. Is that causing an issue?
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 18 Jul 2017 at 12:23pm |
Likely.
Remove the record select and stick with the group select.
|
IP Logged |
|
Nav522
Senior Member
Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
|
Posted: 19 Jul 2017 at 5:38am |
It still doesn't work, think im still missing the logic,
I think I need to go over just to correct myself and give the right specifics.
So here's data in Detail Section. How do I achieve just the output?
SOURCE TRX POLICY FLAGFORMULA
GroupHeaderName : 01
D 01 MA 123 1
GroupHeaderName: 02
D 02 CPK 345 1
D 02 MA 345 1
GroupHeaderName : 03
D 03 NA 456 0
GroupHeaderName : 04
D 04 MA 789 1
I only want to see this as Output and suppress the rest
--------------------------------------------
SOURCE TRX POLICY
D 02 CPK 345
D 02 MA 345
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 19 Jul 2017 at 6:09am |
Do you mean you only want a group where ALL records in that group are either CPK or MA? or a a Group has both types?
Or a combination of those two criteria?
Edited by DBlank - 19 Jul 2017 at 6:10am
|
IP Logged |
|
Nav522
Senior Member
Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
|
Posted: 19 Jul 2017 at 6:46am |
I will be needing to show only the Groups that has both types(CPK,MA)
Thanks.
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 19 Jul 2017 at 6:51am |
Ahh,You will need two flags
//@MAflag example
if table.field IN ['MA'] then 1 else 0
//@CPKflag example
if table.field IN ['CPK'] then 1 else 0
group select example
SUM(@CPKflag,table.groupfield) > 0 AND SUM(@MAflag,table.groupfield) > 0
|
IP Logged |
|
Nav522
Senior Member
Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
|
Posted: 19 Jul 2017 at 6:55am |
worked like a charm. Thank you Sir.
|
IP Logged |
|
|