3 of 3 people found this helpful
I started running into this same problem with COUNTD as well.
I think I may have found a work around using COUNT in combination with WINDOW_MIN.
What does your formula look like? I'm trying to do COUNTD(USERID).
2 of 2 people found this helpful
It's just this:
Window_MIN(COUNT([Name, login or ID of respondent]))
On my work sheet I have CNT([Name, login or ID of respondent]) plus the 3 dimensions I am blending on.
It seems to be working... =S
8 of 8 people found this helpful
This is a new complexity in Tableau v8:
In v7 and earlier, to blend we had to have the linked dimensions in the view, i.e. on Rows, Columns, Pages, or the Marks Card. This is called "DB1" for "Data Blending 1" by Tableau.
In v8, you can use that DB1 blending or the new "DB2" blending where A) the linking fields don't have to be in the view, instead you just click on the linking dimensions in the secondary in the Data Window, and B) you can control those linking dimensions on a per-worksheet basis. The one drawback is that DB2 blending does not support "non-additive aggregates" like COUNTD() and MEDIAN(). When you try to do that, Tableau generates the "Cannot blend the secondary data source because one or more fields use an unsupported aggregation" error, turns the offending pill red, and grays out the view.
It's hard to give an exact roadmap to a solution because blends are so dependent on the data structure of the different sources, defined data relationships, and the pills in the view. Solutions include avoiding DB2 blending and just using DB1 blending for your particular worksheet, using table calcs like SIZE(), using a custom blend, etc. There were a couple of techniques talked about last week in this Tableau blog post by Daniel Hom: http://www.tableausoftware.com/about/blog/2013/5/tips-tricks-alternatives-count-distinct-23253.
Thanks Jonathan - very helpful!
You say that for DB1 blending, we need to have the linked dimensions in the view on either the: Rows, Columns, Pages, or the Marks Card. What about the "Filters" card? It is in the view, but not on one of the cards you listed.
1 of 1 people found this helpful
What's on Rows, Columns, Pages, and/or the Marks Card are the dimensions and measures that generate the display of the view. The dimensions are the independent variables that are part of the GROUP BY clause in the query to the data source, measures are the dependent variables whose values depend on the dimensions. Pills on the Filter Shelf do not change what dimensions are in the view, they are only added to the WHERE or HAVING clause in the query to the data source, or processed inside Tableau where necessary. So "in the view" has come to mean the dimension pills that are in the view that we can see on Rows, Columns, Pages, and/or the Marks Card. Does that make sense?
Also, this thread helped inspire me to do a longer post on this whole topic at Why is COUNTD(Customer Name) red? | Drawing with Numbers that might be helpful as well.
That makes sense Jonathan. Your explanation in the link is perfect (I have read your drawingwithnumbers site before but hadn't seen this post). Keep up the awesome explanations!
One follow up question. I believe that functions which use 'Compute Using' create sub-queries (which is why they maintain granularity integrity and thus return correct results). What impact does 'Computing Using' have on query performance?
Thanks a ton.
1 of 1 people found this helpful
Thanks for the encouragement!
I'm using the definition of query as "the query that Tableau issues to the data source". What we see in a Tableau view is a mix of query results and values computed inside Tableau. Table calculations are performed entirely in Tableau after the query(ies) are returned from the data source, so they don't have any impact on query performance.
Table calcs themselves are their own (large) topic for performance, key drivers include the level of granularity in the view, the cardinality of the view (both of these determined by the dimensions in the view and your data), how much sorting is going on, what kinds of computations the calc is doing (strings are slow, numbers are fast), what kinds of optimization a have been applied to the calcs, and whether there is any densification (domain padding, domain completion, mark type filling, etc.). The specifics of what impacts performance are highly dependent on your data, your calcs, and what's in the view.
Even after pouring over all of this I still don't have a good idea for how to compare countD from DS1 to countD from DS2 which is an identical duplicate of DS1.
The goal of the report is to show the filtered COUNTD for given dimensions versus the unfiltered countd.
I should add that I'm blending (linking) on the dimensions displayed in the report but not linking the filter dimensions.
linked = *
Counting distinct ID from both data sets.
I am new to Tableau. Please help me to do this in Tableau and Saleforce Data.
I need to calculate how many number of resources are available in each month.
Start Date End Date Resource Id Values
1-Jan-15 31-jan-15 Res1 10
1-Jan-15 31-jan-15 Res1 50
1-Jan-15 31-jan-15 Res2 10
1-Jan-15 31-jan-15 Res3 10
1-Feb-15 28-Feb-15 Res1 10
1-Mar-15 31-Mar-15 Res2 10
1-Apr-15 30-Apr-15 Res3 10
With this we need to find for each month(End Date is blended key) how many resources are available.
Please also make sure, this data source is going to be used as secondary data source. so when we use Countd(ResourceId) it gives an error as
Cannot blend the secondary data source because one or more fields use an unsupported aggregation.
Please let me know, how would i achieve to find this distinct count of resource per month.