Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Below is my data set. I'm looking to group the account by state based on groups in the load script.
Also, how can I include the County, City, Zip columns in the final result set. Attached is a qvw for reference.
Data set:
STATE | COUNTY | CITY | ZIP | ACCOUNT | GROUP | AMOUNT |
CA | NAPA | XXX | 1001 | A123 | Low | 100 |
CA | NAPA | YYY | 1002 | A123 | Low | 200 |
CA | MONO | AAA | 1003 | A123 | High | 300 |
CA | ORANGE | BBB | 1004 | A123 | Medium | 400 |
NY | SUFFOLK | AAA | 2001 | A123 | Low | 50 |
NY | SUFFOLK | BBB | 2002 | A123 | Low | 70 |
NY | SUFFOLK | BBB | 2002 | A123 | High | 90 |
PA | BUTLER | CCC | 3001 | A123 | Low | 110 |
PA | COLUMBIA | DDD | 3002 | A123 | Low | 120 |
PA | CLINTON | AAA | 3003 | A123 | Low | 130 |
PA | CLINTON | AAA | 3003 | A123 | High | 140 |
PA | CLINTON | BBB | 3004 | A123 | Medium | 150 |
Expected Result (also need to include County, City, Zip somehow as a part of final data set so that users can filter based on the state, county, city and zip):
STATE | ACCOUNT | GROUP | AMOUNT |
CA | A123 | LOW | 300 |
CA | A123 | MEDIUM | 400 |
CA | A123 | HIGH | 300 |
NY | A123 | LOW | 120 |
NY | A123 | HIGH | 90 |
PA | A123 | LOW | 360 |
PA | A123 | MEDIUM | 150 |
PA | A123 | HIGH | 140 |
Simply adding this?
Right Join(Table)
LOAD STATE, ACCOUNT, GROUP, Sum(AMOUNT) as AMOUNT Resident Table Group By STATE, ACCOUNT, GROUP Order By GROUP;
Can you add this at end, And check..
Final:
NoConcatenate
LOAD STATE, ACCOUNT, GROUP, Sum(AMOUNT) as AMOUNT Resident Table Group By STATE, ACCOUNT, GROUP Order By GROUP;
DROP Table Table;
I have attached an example. Check if this is usefull for you.
Jaume, did you attach a different test.qvw file?
Thanks Anil. That works.
Now, how do I bring in other columns County, City and Zip in the UI. Any ideas?
Yes, my mistake. I have update the older message with the correct file.
Simply adding this?
Right Join(Table)
LOAD STATE, ACCOUNT, GROUP, Sum(AMOUNT) as AMOUNT Resident Table Group By STATE, ACCOUNT, GROUP Order By GROUP;
I suggest you to close this thread by flag "Correct Answer"