Grouping From String
Grouping From String
I have a report that I need to create to take a variety of string values and turn them into a data source, then group like items within that datasource.
I've attached the sample data and the report as far as I've gotten it.
The original data comes from a string value with a ; delimiter that comes from a variety of lines in a datasource. I take all the string values and concatenate them together, then use a Substring formula to pull them out into individual lines. In the attached example, there are about 50 lines in the original datasource, each with a Quantity that defines how many subfields there will be in the string value on each line (Hardware.Comments), to a total of 202 individual subfields all together.
I have a couple of issues.
The first is how to set the count value for the second set of detail records so that it is equal to the total of the quantity from the first databand (Sum(Hardware.QTY))
The second is how to take all these subfields from the string broken out into individual records with the final data band and group them by like values and sum the Hardware.QTY for each like value.
The end result of this report should be a short list showing
223 - QTY ###
224 - QTY ##
etc.
https://dl.dropbox.com/u/99199395/310185-02.zip
Thanks for any help you can provide.
I've attached the sample data and the report as far as I've gotten it.
The original data comes from a string value with a ; delimiter that comes from a variety of lines in a datasource. I take all the string values and concatenate them together, then use a Substring formula to pull them out into individual lines. In the attached example, there are about 50 lines in the original datasource, each with a Quantity that defines how many subfields there will be in the string value on each line (Hardware.Comments), to a total of 202 individual subfields all together.
I have a couple of issues.
The first is how to set the count value for the second set of detail records so that it is equal to the total of the quantity from the first databand (Sum(Hardware.QTY))
The second is how to take all these subfields from the string broken out into individual records with the final data band and group them by like values and sum the Hardware.QTY for each like value.
The end result of this report should be a short list showing
223 - QTY ###
224 - QTY ##
etc.
https://dl.dropbox.com/u/99199395/310185-02.zip
Thanks for any help you can provide.
Re: Grouping From String
Hello,
Can you please show a sample image or screenshot how it should look like with sent data.
Thank you.
Can you please show a sample image or screenshot how it should look like with sent data.
Thank you.
Re: Grouping From String
Please find the image of the desired result here.
https://dl.dropbox.com/u/99199395/Key_Report_Result.png
Thanks.
https://dl.dropbox.com/u/99199395/Key_Report_Result.png
Thanks.
Re: Grouping From String
Hello,
Most probably, but the once solution will be spliting this column for each value (without delimeters) and use grouping in query.
Thank you.
Most probably, but the once solution will be spliting this column for each value (without delimeters) and use grouping in query.
Thank you.
Re: Grouping From String
Can you explain what you mean? I don't understand.
Re: Grouping From String
Hello,
For example:
now :
ID | Key | Value ...
1 | 212;213; 214 | 1
2 | 212;217 | 1
3 | 213 | 1
...
1 | 212 | 1
1 | 213 | 1
1 | 214 | 1
2 | 212 | 1
2 | 217 | 1
3 | 213 | 1
...
And use the query with grouping:
select ID, Key, Sum(Value) as QTY from Table
group by ID, Key
Thank you.
For example:
now :
ID | Key | Value ...
1 | 212;213; 214 | 1
2 | 212;217 | 1
3 | 213 | 1
...
ID | Key | Value ...the once solution will be spliting this column for each value (without delimeters)
1 | 212 | 1
1 | 213 | 1
1 | 214 | 1
2 | 212 | 1
2 | 217 | 1
3 | 213 | 1
...
And use the query with grouping:
select ID, Key, Sum(Value) as QTY from Table
group by ID, Key
Thank you.
Re: Grouping From String
So unless I'm understanding, I think i have the splitting part working, on pages 2-8 of the current report, I just don't know how to get the grouping working.
Re: Grouping From String
Hello,
Please check the modified report in attachment.
Thank you.
Please check the modified report in attachment.
Thank you.
- Attachments
-
- Capture.PNG (120.55 KiB) Viewed 2934 times
-
- Key Numbers_modified.mrt
- (64.27 KiB) Downloaded 238 times
Re: Grouping From String
Thanks. That looks great, but there appears to be an issue. I created the summary in the image in excel from the report export, so I beleive the QTY's are correct in the image. When I add up your numbers, I only get a total of 184. The total should be 202.
Also, would it be possible to sort ascending by key number?
Thanks,
Tim S.
Also, would it be possible to sort ascending by key number?
Thanks,
Tim S.
Re: Grouping From String
Hello,
Sorry, error in indexes. Please check the report in attachment.
Thank you.
Sorry, error in indexes. Please check the report in attachment.
Thank you.
- Attachments
-
- Key Numbers_modified.mrt
- (64.27 KiB) Downloaded 255 times