How to calculate value from perticular column and row in pivot table

Hi all,
I am having following pivot table.
Country
A
B
C
D
F
G
H
J
K
L
M
Grand Total
Canada
1
1
3
3
12
14
13
97
China
8
4
3
19
India
2
47
448
176
395
3656
1964
1360
8077
USA
1545
352
380
26
10
4
8
32
2054
1023
758
4624
UK
12
19
13
23
33
298
Grand Total
1545
352
381
29
72
474
184
427
5743
3028
2167
13114
Now I want sum of Columns A, B, C, K, M where Country = India in one field.
and sum of D, F, g in another field. and sum of remainig columns in another field.
How can i get sum of values with some where condition in pivot table.
Thanks,

Hi Michael,
Following is the representation which i want
CouRntry
ROW LABLES
A
B
C
Total of
ABC
F
G
Total
Of FG
J
K
L
TOTAL
of JL
Grand
Total
Canada
1
1
3
3
12
14
13
97
China
8
4
3
19
India
2
47
448
176
395
3656
1964
1360
8077
USA
1545
352
380
26
10
4
8
32
2054
1023
758
4624
UK
12
19
13
23
33
298
Grand Total
1545
352
381
29
72
474
184
427
5743
3028
2167
1
Also if i get sum how can i add a column in between of the fields.
Thanks

Similar Messages

  • How to Calculate Duration from Date Columns

    Hello,
    I would like to calculate duration from date columns. Using the following query
    SELECT DISTINCT
    EVENT_ID,
    To_Char(RU.START_TIME, 'HH24:MI') START_TIME,
    To_Char(RU.END_TIME, 'HH24:MI') END_TIME
    FROM ROOM_USAGE RU
    What I need is to subtract START_TIME from END_TIME and result should be in minutes.
    Many Thanks,

    But, i think you need to calculate the number of days if the days are not same -
    satyaki>
    satyaki>
    satyaki>
    satyaki>with ru
    2 as
    3 (
    4 select '05-JAN-2007 15:10:20' start_time, '07-JAN-2007 19:20:20' end_time from dual
    5 union all
    6 select '08-JAN-2007 05:10:20' start_time, '07-JAN-2007 07:07:20' end_time from dual
    7 )
    8 select ru.start_time, ru.end_time, SUBSTR(numtodsinterval(to_date(RU.END_TIME,'DD-MON-YYYY HH24:MI:SS')-to_date(RU.START_TIME,'DD-MON-YYYY HH24:MI:SS'), 'DAY'), 12, 8) duration
    9 from ru;
    START_TIME END_TIME DURATION
    05-JAN-2007 15:10:20 07-JAN-2007 19:20:20 04:09:59
    08-JAN-2007 05:10:20 07-JAN-2007 07:07:20 22:03:00
    satyaki>
    Or, Am i missing anything?
    Regards.
    Satyaki De.
    is it possible to to add the duration? making the total hours to 26:12 (twentysix hours and twelve minutes)

  • How to get the current selected column and row

    Hi,
    A difficult one, how do i know which column (and row would also be nice) of a JTable is selected?
    e.g.
    I have a JButton which is called "Edit" when i select a cell in the JTable and click the button "Edit" a new window must be visible as a form where the user can edit the a part of a row.
    Then the column which was selected in the JTable must be given (so i need to know current column) and then i want the TextField (the one needed to be edited) be active with requestFocus(). So it would be
    pricetextfield.requestFocus();
    Problem now is that i have to click every time in the window the JTextField which was selected in the JTable. I have chosen for this way of editing because my application is multi-user and it would be too difficult for me when everybody did editing directly (catch signals, reload data, etc.).
    My question is how do I know the current column and the current row in a JTable?

    I'm not sure what your mean by the "current" row or column, but the following utility methods return
    which row and column have focus within the JTable.
    public static int getFocusRow(JTable table) {
        return table.getSelectionModel().getLeadSelectionIndex();
    public static int getFocusColumn(JTable table) {
        return table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
    }

  • How to insert parameter value into multiple columns and rows

    Hi All,
    I have one procedure insert_tab and I am passing
    100~101~102:103~104~105:106~107~108 as a parameter to that procedure. I wanted to insert each numeric value into one column. The output of the table should contain
    Table:
    Col1 Col2 Col3
    100 101 102
    103 104 105
    106 107 108
    Awaiting for your reply..

    That's not more clear for me...
    Anyway, if you really want a procedure for that, try :
    SQL> create table tblstr (col1 number,col2 number,col3 number);
    Table created.
    SQL>
    SQL> create or replace procedure insert_fct (p_string IN varchar2)
      2  as
      3  v_string     varchar2(4000):=p_string||':';
      4  v_substring  varchar2(4000);
      5 
      6  begin
      7      while instr(v_string,':') > 0 loop
      8            v_substring := substr(v_string,1,instr(v_string,':')-1)||'~';
      9            insert into tblstr(col1,col2,col3)
    10            values (substr(v_substring,1,instr(v_substring,'~',1,1)-1),
    11                    substr(v_substring,instr(v_substring,'~',1,1)+1,instr(v_substring,'~',1,2)-instr(v_substring,'~',1,1)-1),
    12                    substr(v_substring,instr(v_substring,'~',1,2)+1,instr(v_substring,'~',1,3)-instr(v_substring,'~',1,2)-1));
    13            v_string:=substr(v_string,instr(v_string,':')+1);
    14      end loop;
    15  end;
    16  /
    Procedure created.
    SQL>
    SQL> show err
    No errors.
    SQL>
    SQL> select * from tblstr;
    no rows selected
    SQL> exec insert_fct('100~101~102:103~104~105:106~107~108')
    PL/SQL procedure successfully completed.
    SQL> select * from tblstr;
          COL1       COL2       COL3
           100        101        102
           103        104        105
           106        107        108
    SQL> exec insert_fct('109~~')
    PL/SQL procedure successfully completed.
    SQL> exec insert_fct('~110~')
    PL/SQL procedure successfully completed.
    SQL> exec insert_fct('~~111')
    PL/SQL procedure successfully completed.
    SQL> select * from tblstr;
          COL1       COL2       COL3
           100        101        102
           103        104        105
           106        107        108
           109
                      110
                                 111
    6 rows selected.
    SQL> Nicolas.

  • How to derive value from another variable and use it to read master data?

    Hi,
    I have following case:
    First I need to read the value from Cost Center -variable (ZIPCC) and then I need to use that value to determine the home currency of that cost center from the cost center master data table (field: OBJ_CURR).
    I know to basic idea on how to do this, but don't seem to get the syntax correct. Could someone point me in the right direction?
    So the objects in play are:
    ZIPCC = Cost center selection variable (mandatory, single value)
    ZIPCUR = Cost Center Currency variable (customer exit, single value)
    0COSTCENTER
    0OBJ_CURR = Field in cost center master data
    Help will be greatly appreciated!
    -m

    Hi,
    Thank you very much for your example I can see that this logic works! However I'm experiencing trouble in selecting the 0OBJ_CURR
    This kind of declaration isn't working: "D1 Like /BIC/0OBJ_CURR."
    And the same goes for the Selection:
    "Select single OBJ_CURR into D1 from /BI0/PCOSTCENTER where COSTCENTER = i_t_var_range-low."
    This is where my syntax also went wrong.
    0OBJ_CURR is a unit, is there a special way to declare it and use it in the code?
    (and 0CURRENCY is a reference unit for 0OBJ_CURR).
    Do you have adivce on this?
    -miikka

  • How to concatinate values of two columns and update into another column

    There is a table : TEST contains three columns - Column1 , Column2 , Column 3
    Column1 contains values - (1,2,4)
    Column2 contains values : (a,b,c)
    Column 3 is empty .
    Target : Values in column 3 should be (1a,2b,4c)
    Need to achieve this through procedure .

    Paul if i want to concatenate two strings or alpha numeric characters from 2 fields and display in the third field,Will this code be able to do that?

  • How to get value from option box and submit accordingly

    Sorry for posting my question. I have been trying to edit message and repost it and not successful. Hence I am reposting my question. Please let me know.
    I am right now exploring JSF for presentation layer. I am designing a form with <h:outputLabel..> and <h:inputText...> for the user to input his value. I also have a radio button as below. <h:outputLabel..>
    <h:inputText...>
    <h:selectOneRadio id="libraryList" >
                                <f:selectItems value="#{libraryList}"/>
                            </h:selectOneRadio>And I have included the following piece of code in faces-config.xml as below.
    <managed-bean>
            <managed-bean-name>libraryList</managed-bean-name>
            <managed-bean-class>java.util.HashMap</managed-bean-class>
            <managed-bean-scope>application</managed-bean-scope>
            <map-entries>
                <map-entry>
                    <key>Pass</key>
                    <value>Pass</value>
                </map-entry>
                <map-entry>
                    <key>Fail</key>
                    <value>Fail</value>
                </map-entry>
            </map-entries>
        </managed-bean>Hence I get two option box as Pass and Fail.
    I am also bit aware of navigation rules of JSF. Now I want the user to take to the step 2 if he chooses the option Pass and if the user chooses Fail, then I want to reset the values of the above form and display the same form.
    I have not done any Java part of the application yet as I am a newbee and hence started doing JSP pages and config-faces.xml part. Please let me know how to proceed further.

    Create a bean, bind the value to the bean, let the action method return that value and add navigation-case entries for those outcomes.

  • How to get value in previous column and another row from Matrix with Custom Code?

    I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
    This is example report:
    * I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
    * First value of Open is item field in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
    Detail for Red number:
    1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
    expression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
    2. tb_TOTAL1 group on item_part = 1
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
    3. tb_TOTAL2 group on item_part = 3 or item_part = 4
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
    4. tb_TOTAL3 group on item_part = 2
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
    5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
    expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
    My custom code:
    Dim Shared prev_close As Double
    Dim Shared now_close As Double
    Dim Shared now_open As Double
    Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
        now_close = TOTAL3 + NowOpening
        prev_close = now_close
        Return now_close
    End Function
    Public Function GetOpening(Month as String,NowOpen as Double)
        If Month = "1" Then
            now_open = NowOpen
        Else    
            now_open = prev_close
        End If
        Return now_open
    End Function
    Thanks alot for your help!
    Regards
    Panda A

    Looks okay to me.
    Perhaps the variables should be declared as public (?)

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

  • HOW TO READ DATA FROM A FILE AND INSERT INTO A TABLE USING UTL_FILE

    Hi..
    I have a file.I want to read the data from file and load it into a table using utl_file.
    how can I do it?
    Any reply apreciated...

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • Button values in dynamic columns and rows

    Hi,
    I am working on webpage that allows the user to dynamically browse a database. I already did this as an applet and was asked to convert it to server-side intensive. Thus began my adventure into JSP and servlets.
    The problem i am having is that at some point a table is generated with a number of columns having submit buttons instead of just text. I want to get the column number and the value of the button that user clicks and use it in my servlet.
    Can anyone suggest a way to do this ?
    My current train of thoughts is to attach the column index to the name of the button and use javascript's onclick to call a function to set a hidden parameter. I am a novice to javascript - will it be possible to pass the name attribute of the button to the function ?
    Also, can I use jsp tags inside the javascript function ?
    TIA
    -Harry
    Below is the code for generating the page.
    <jsp:useBean id="tableData" scope="session" class="beans.TableBean" />
    <table border="1">
    <% int columnCount = tableData.getColumnCount(); %>
    <% int rowCount = tableData.getRowCount(); %>
    <tr align="center">
    <%for(int i=0; i < columnCount; i++)
    {%>
    <td>
    <%= tableData.getColumnTitle(i) %>
    </td>
    <%}%>
    </tr>
    <% for(int i=0; i<rowCount;i++)
    {%>
    <tr>
    <%for(int j=0; j<columnCount; j++)
    String val = tableData.getValueAt(i,j);
    %>
    <td>
    <%if(tableData.isDrill(j))
    %>
    <input type="submit" name="<%=val%>" value="<%=val%>" >
    <%}
    else
    {%>
    <%=val %>
    </td>
    <%}
    }%>
    </tr>
    <%}%>
    </table>

    Is there other data being passed to the servlet also... by the looks of the code you're using now, there isn't. If this is the case, why bother with submit buttons? You can just use an HTML button, and link it to the servlet passing the information you need, sending your column numbers as parameters inside the url,
    <input type="button" value="<%=val%>" onClick="window.location.href='myServlet?col=<%=j%>&val=<%=val%>';"

  • How to read data from SharePoint list and append to html table?

    Hi All,
    I would like to create custom view of SharePoint list, so want to append those sharepoint list  items in a custom html table design using content editor webpart.
    How to achieve this? thanks in advance!

    Content edit web part is not the right control. You can either Content Query Web Part
    or Data view web part, where you need to modify xslt template using
    SharePoint Designer and can render list data as per choice.
    For Content Query Web Part:
    Using the Content Query Web Part
    Customizing the Content Query Web Part and Item Style
    How to Customize SharePoint List Content Display using Content Query Web Part
    For Data View Web Parts
    Working with Data view Web Parts
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • Switch columns and rows in SSRS

    Hi,
    I have a report with static columns that looks something like this:
    Date                     
    Column 1            
    Column2             
    Column30
    December 1      
       xxx                     
        xxx                    
        xxx
    December 2        
     xxx                     
        xxx                    
        xxx
    December 31      
    xxx                      
        xxx                    
        xxx
     It is based on SP that produces a temporary table exactly the same way as the report output (my Dec
    1 to 31 rows are details that are precalculated within SP).
    I need to switch columns and rows as my report is getting too wide.
    Does anyone know how it is done in SSRS 2005 (with SQL 2005 data source) without re-writing my SP?
    Thank you in advance!

    Thank you for your reply Jason.
    Unfortunately I do not have tablix within SSRS 2005; I only have matrix and table. For the original report I am using table as it displays data exactly the way it
    is passed from the SP. You cannot switch columns and rows within the table. I tried matrix, but it didn’t work either… Is there any work around that you know of?
    Thanks again!
    Lana

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • [Forum FAQ] SharePoint 2013: Extracting values from a multi-value enabled lookup column and merge values to a multi-value enabled column

    For some business requirements, users want to extract values from a multi-value enabled lookup column
    and add items to another list based on each separate value. In contrast, others want to find duplicate values in the list and merge associated values to a multi-value enabled column and then
    add items to another list based on the merged value. All of these can be achieved using SharePoint Designer 2013 Workflow.
    How to extract values from a multi-value enabled lookup column and add items to another list based
    on each separate value using SharePoint Designer 2013.
    Important actions: Loop Shape; Utility Actions
    Three scenarios
    Things to note
    Steps to create Workflow
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013.
    Important actions: Call HTTP Web Service; Build Dictionary
    Things to note
    Steps to create Workflow
    How to
    extract values from a multi-value enabled lookup column and
    add items to another list based on each separate value using SharePoint Designer 2013.
    For example, they have three lists as below. They want to
    extract values from the Destinations column
    in Lookup2 and add items to Lookup3 based on each country and set Title to current item: ID.
    Lookup1:
    Title (Single line of text)
    Lookup2:
    Title (Single line of text), Destinations (Lookup; Get information from: Lookup1 in Title column).\
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Important action
    1. Loop Shape: SharePoint Designer 2013 support two types of loops: loop n times and loop with condition.
    Loops must also conform to the following rules:
    Loops must be within a stage, and stages cannot be within a loop.
    Steps may be within a loop.
    Loops may have only one entry and one exit point.
    2. Utility Actions: It contains many actions, such as ‘Extract Substring from Index of String’ and ‘Find substring in String’.
    Three scenarios
    We need to loop through the string returned from the look up column and look for commas. There are three
    scenarios:
    1.  No comma but string is non-empty so there is only one country.
    2.  At least one comma so there is at least two or more countries to loop.
    3.  In the loop we have consumed all the commas so we have found the last country. 
    Things to note
    There are two things to note:
    1. "Find string in string (output to Variable:index)"  will return -1 if doesn't find
    the searched for string.
    2. In the opening statement "Set Variable: Countries to Current Item:Destinations" set the return
    field as  "Lookup Values, Comma Delimited".
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Destinations (Lookup; Get information from: Lookup1 in Title column).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup2.
    Add conditions and actions:
    Start the workflow automatically when an item is created.
    Add item to Lookup2, then workflow will be started automatically and create multiple items to lookup3.
    See the below in workflow History List:
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013
    For example, they have three lists as below. They want to find duplicate values in the Title column in
    Lookup3 and merge country column to a multi-value enabled column and then add item to lookup2 and set the Title to Current Item: Title.
    Lookup1:
    Title (Single line of text)
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Lookup2:
    Title (Single line of text), Test (Single line of text).
    Important actions
    "Call HTTP Web Service"
    action: In SharePoint 2013 workflows, we can call a web service using a new action introduced in SharePoint 2013 named Call HTTP Web Service. This action
    is flexible and allows you to make simple calls to a web service easily, or, if needed, you can create more complex calls using HTTP verbs as well as allowing you to add HTTP headers.
    “Build Dictionary"
    action:
    The Dictionary variable type is a new variable type in the SharePoint 2013 Workflow.
    The following are the three actions specifically designed for the Dictionary variable type: Build Dictionary, Count Items in a Dictionary and Get an Item from a Dictionary.
    The "Call HTTP Web Service" workflow action would be useless without the new "Dictionary" workflow action.
    Things to note
    The
    HTTP URI is set to https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be sort by Id in descending order.
    Use Get
    d/results(0)/Id form
    Variable: ResponseContent (Output to
    Variable: maxid) to get the Max ID.
    Use Set
    Variable: minid to Current List:ID to get the Min ID.
    Use Copy from
    Variable: destianation , starting at
    1 (Output to
    Variable: destianation) to remove the space.
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Test (Single line of text).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup3.
    Add a new "Build Dictionary" action
    to define the http request header:
    Add a Call HTTP Web Serviceaction, click on
    this and paste your http request.
    To associate the
    RequestHeader variable, select the Call action property,
    set the
    RequestHeaders property to
    RequestHeader:
    In the Call action, click on
    response and associate the response to a new
    variable: ResponseContent (of type Dictionary).
    After the Call action add Get item from Dictionary action to get the Max ID.
    Add Set Workflow Variable action to get the Min ID.
    Add Loop Shape (Loop with Condition) to get all the duplicate titles and integrate them to a string.
    Create item in Lookup2.
    The final Stage should look like this:
    Start the workflow automatically when an item is created.
    Add item to Lookup3, then workflow will be started automatically and create item to lookup2.
    See the below in workflow History List:
    References
    SharePoint Designer 2013 - Extracting values from a multi-value enabled lookup column into a dictionary as separate items:
    http://social.technet.microsoft.com/Forums/en-US/97d34468-1b53-4741-88b0-958472f8ca9a/sharepoint-designer-2013-extracting-values-from-a-multivalue-enabled-lookup-column-into-a
    Workflow actions quick reference (SharePoint 2013 Workflow platform):
    http://msdn.microsoft.com/en-us/library/jj164026.aspx
    Understanding Dictionary actions in SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/jj554504.aspx
    Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/dn567558.aspx
    Calling the SharePoint 2013 Rest API from a SharePoint Designer Workflow:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

    GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
    cancel).  I only found this out when recreating your workflow on a similar, but much more complex list set.  
    To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace.  I configured it as "Copy from
    Variable: Countries, starting at
    1 (Output to Variable: Countries), which takes care of this issue in those few cases.
    Otherwise, WOW!  AWESOME JOB!  Thanks!  :)

Maybe you are looking for