0

Table klip, count between sources

Hi

I have 2 datasources hooked on a Rest api.

The first datasource (ds1), gives me the list of groups, with a groupid and a groupname.

The sceond datasources (ds2), gives me a list of tickets, where they are assigned to a group.

Now I want a table to show me the groupnames ds1 in one coloum, and the count of ticket in the group from ds2.

How do I do that? I have tryed with lookup and groupby.

3 comments

  • 0
    Avatar
    Shima Beigzadeh

    Hi Casper, 

    Thanks for the post in our community! 

    I have created one simple example to show how we use LOOKUP to connect 2 datasources. 

    In my example I have 2 tables: 
    Table 1: DS1

    Table 2: DS2


    Now to create a table to have Group name and the count of Tickets, you would use LOOKUP () function with GROUP() and GROUPBY() functions together. 
    So you would LOOKUP the Group ID from DS1 as 1 parameter of LOOKUP, then Group the Group ID from DS2 as 2nd parameter, and finally GROUPBY(Group ID, Ticket, count) as 3rd parameter of your LOOKUP function. 
    It will be something like below: 

     LOOKUP(@Sheet1,A:A;,GROUP(@Sheet1,A:A;), GROUPBY(@Sheet1,A:A;,@Sheet1,B:B;, "count(values)"))


    I hope this helps! If you have further questions or would like our support team to take a look at your account directly, feel free to send a request over to support@klipfolio.com

    Best, 
    Shima

  • 0
    Avatar
    Casper Andersen

    Hi Shima

    Thanks for your replay! :)

    I cant make it work, and I don't know what I'm doing wrong.

    I have 2 REST datasource.

    The first one with Groups look like the following, and I use "name" in column1:

    The other datasource with my tickets look like this:

    My formel is: 

    The numbers it gives me dosn't match the reality. What do I do wrong? :)

  • 0
    Avatar
    Shima Beigzadeh

    Hi Casper, 

    The example I gave you, was a simple tabular output to show how to use LOOKUP() function. And you are applying that to your formula very good. I think in your case, there is a misalignment issue which happen very often with JSON output data. 

    Would you please enable support access so I can get into your account and have a closer look to your data? You may open a support ticket by sending email to support@klipfolio.com and let us know the Klip name in question. 

    Best, 
    Shima

     

Please sign in to leave a comment.