Using two distinct data sets in one card

Options

I have two datasets.

 

The first has the dealers name with how many accounts they have.

 

For example:

 

Company nameTotal # Accounts
Company A1990
Company B450
Company C3000

 

 

The second shows all of the alarms for a given period and which account and dealer they are for.

 

For example:

 

Alarm DateAccount #Company Name
1/15/2016H12345Company A
2/16/2016J4321Company A
1/2/2016K98444Company B
1/25/2016LO48354Company C
1/12/2016HJ32454Company A

 

 

I want the card to be able to show me the total number of alarms that each company had in a stacked or group bar graph and then compare that to their total number of accounts.

 

I can make each card seperate, but I can't figure out how to combine them both so that it looks like the attached image where the green column shows total number of accounts and the red column shows total number of alarms. This way I can see the percent of accounts had alarms for each dealer.

 

Any thoughts?

Comments

  • Shevy
    Shevy Contributor
    Options
    You will want to combine the two data sets into one data set. If I interpret your tables correctly, your first table is already a summary table by company. The second is a detail table that you want to summarize. Using ETL, bring the detail table in as a source, and use the Group by function to create a summary table. When you drag the Group by box into the ETL screen you will be asked to select the column that identifies the grouping - in the example this is the Company Name field. You then select name of the new field: I use "Total Alarms". Choose a field to aggregate: "Account #" and the the aggregation type: "Count". Bring in the second data set using the Input Data set widget. It will ask you to select the columns to join on: which is "Company Name" in both tables from your example. You can also select the type of join (left, right, inner, full) to get the right data set. Link this to an output data set and you then can use that set to do the card in question . Ultimately your ETLO will look something like the attached. Let me know if you have more questions or would like details.
    Dojo Community Member
    ** Please like responses by clicking on the thumbs up
    ** Please Accept / check the answer that solved your problem / answered your question.
This discussion has been closed.