Skip to main content

I've got two data sources. One has a line for every occurance of an event, the other has a monthly total. How do I go about adding the two? I basically need to add the Count from one with the Total from the other. The aim is to be able to creat a stacked barchart, which includes both.

 

I'm thinking I need to create some sort of calculated field which adds the two, but am at a loss where to start.

 

I've included a twbx-file with dummy data to illustrate the problem.

6 respostas
  1. 10 de out. de 2024, 13:39

    You need a union of your two datasets. However, a union generally requires that the field names and data types be the same so that they align/match. For example, Ark is month based whereas Billeter contains more detail/grain and one is essentially a SUM() the other a COUNT(). You could do this with pre-processing in Tableau Prep (packaged flow attached).

     

    You need a union of your two datasets. However, a union generally requires that the field names and data types be the same so that they align/match.Which would then produce the following in Desktop (with formatting and use of Reference Lines):

    Screenshot 2024-10-10 at 6.39.08 AMYou'll learn by doing so take a look at the flow and step into the changes to understand what was done.

     

    Best, Don Wise -

    Please don’t forget to upvote and/or Select as Best by clicking the hyperlink below in the response that answered your question. 

0/9000