-
1. Re: Count Distinct
Tom WFeb 8, 2017 9:39 AM (in response to michel.khennafi)
Drag your business dimension onto the rows shelf, then put facility type on columns. Add the distinct count onto the body of the report.
-
2. Re: Count Distinct
michel.khennafi Feb 8, 2017 9:54 AM (in response to Tom W)Thank you so much for taking the time. Your proposed solution does not allow me to add additional measures / column onto the table... all additional measures come under the column header causing the number of faccilities to duplicate in every pane... is there a possibility to have the number of facilities per facility type only one in the table?
-
3. Re: Count Distinct
Tom WFeb 8, 2017 10:06 AM (in response to michel.khennafi)
Michel,
There isn't much I can do to help without a sample of your data in Tableau. Please attach a Tableau Packaged Workbook.
-
4. Re: Count Distinct
michel.khennafi Feb 8, 2017 12:48 PM (in response to Tom W)Tom:
Truly appreciate your patience... Here is the sample data on first tab and the desired result on separate tab... the plant / depot and carrier counts are count distincts of the values in the database. I created an extract for my data.
-
CountDistinct.zip 8.1 KB
-
-
5. Re: Count Distinct
Tom WFeb 8, 2017 1:00 PM (in response to michel.khennafi)
Thanks for the example, it's still not 100% clear though as there's no calculations.
Here's what I think you need to do; create a couple of calculations like:
COUNTD(IF [Facility Type] = 'Plant' then [Facility] END)
and
COUNTD(IF [Facility Type] = 'DC' then [Facility] END)
Tehn drag 'Measure Names' onto columns, and drag the 'Measure Values' onto the 'text' button on the marks card. Then you can select your newly created calculations from above and the SUM of the cost field and the COUNT DISTINCT of the Carrier field.
-
6. Re: Count Distinct
michel.khennafi Feb 8, 2017 1:18 PM (in response to Tom W)Truly Appreciated Tom... It worked just fine as explained in your last post