Divide count of Table 1 by count of Table 2 on the same time interval

0 votes

I have two tables with ID and time stamp. Table 1 has two columns: Cust_id and cust_created. Table 2 has two columns: Cust_id and post_date. I'd like to create a chart in Tableau that displays the Number of Records in Table 1 divided by Number of Records in Table 2, by week. 

Apr 12, 2018 in Tableau by GandalfDwhite
• 1,320 points
718 views

1 answer to this question.

0 votes

Use a custom SQL to create a new data source

SELECT created_table.created_date,
   created_table.created_count,
   posted_table.posted_count
FROM (SELECT TRUNC (cust_created) AS created_date, COUNT (*) AS created_count
      FROM Table1) created_table
   LEFT JOIN
   (SELECT TRUNC (post_date) AS posted_date, COUNT (*) AS posted_count
      FROM Table2) posted_table
       ON created_table.created_date = posted_table.posted_date
answered Apr 12, 2018 by QueenBee
• 1,820 points

Related Questions In Tableau

0 votes
1 answer

Filter Measure Based on Different Variables of the Same Dimension

Hi Nithin, I used calculated fields. You can use ...READ MORE

answered Mar 11, 2019 in Tableau by Cherukuri
• 33,030 points
488 views
0 votes
1 answer

Count No. of days based on 2 dimension

Hey, @Ravi, You can go through this to ...READ MORE

answered May 26, 2020 in Tableau by Gitika
• 65,910 points
531 views
0 votes
1 answer

how to get the count of non zero values in a row

In first part you should solve the ...READ MORE

answered Apr 4, 2018 in Tableau by Atul
• 10,240 points
2,865 views
0 votes
1 answer

How to use LOD to count distinct number of records based on some condition?

From the desired output it seems that ...READ MORE

answered Apr 9, 2018 in Tableau by xyz
• 1,560 points
17,016 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
9,423 views
+2 votes
1 answer
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
1,301 views
+2 votes
1 answer
0 votes
1 answer

Apply filters only on the dashboard

First of all why??? Second of all, it ...READ MORE

answered Apr 14, 2018 in Tableau by QueenBee
• 1,820 points
470 views
0 votes
1 answer

Return last day of each moth in the calendar

Try this way: Place the order date in ...READ MORE

answered Apr 20, 2018 in Tableau by QueenBee
• 1,820 points
445 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP