0
votes

For some reason when I try to group a field created by a fixed level of detail groups containing more then one item disappear from the view.

The basic set up is that there are 'unique event IDs' which are RCIPID which have one or two dates associated with them (some events have two separate dates that are non-linear). There is a 'follow up' date which is tied only to the event location and not the RCIPID, but each RCIPID has only one location.

I've joined the 'follow up' data to the main file based on the location. The below computations [NTC Submission Date] is the date of the event. [Live Date] is the date of the followup. The computations correctly give the number of days after the event that the follow up happened.

However when I try to do a unique count of NTC Date (Or RCIPID) and then group the computations any group with more then one day disappears.

 FP - Straight Diff
    DATEDIFF('day', [NTC Submission Date], [Livedate])

FP - Remove Negatives
    IF [FP - Straight Diff]<0
        Then DateDiff('day',[NTC Submission Date],TODAY())
    ELSE
         [FP - Straight Diff]
    END

FP - Days after NTC
    {FIXED [Rcip Id], [NTC Submission Date]: MIN([FP - Remove Negatives])}

It works when it is not grouped together

Works when not grouped

But as soon as I group it all of the groups with more then one day disappear.

enter image description here

Any and all help is greatly appreciated. I think it has /something/ to do with being a dimension, but I honestly don't know what.

The goal is a bar chart similar to the second one, but with the groups "4-5 Days", "6-10 Days", "11-20 Days", and "Over 20 Days" visible. Those values do exist in the data and if I change the view to show the day instead of a count it shows the proper calculations:

enter image description here

EDIT: Using a calculated field instead of groups did not work. Trying a concatenated RCIPID and NTC Submission Date also did not have an effect.

enter image description here

1
Just a few questions: 1. Is [FP - Days Broken] = [FP - Days after NTC]? 2. How are you grouping the data. Right clicking? Have you tried bins? 3.Could you please add the specifically what the visualization should show? (I want to show the min(number of days between submission and followup) for each distinct submission date)tyvich
[FP - Days Broken] is what I named the group. I created the group by right clicking [FP - Days after NTC] selected Create --> Group and then manually adding each day to the appropriate group. I want a bar chart that shows the number of times a follow up came 1 day after, 2 days after, ... 4-5 days after... over 20 days after the submission.Emily Alden
@tyvich I also added a different view that shows the data exists. It just doesn't like the way it's being aggregated... (I think....)Emily Alden

1 Answers

0
votes

I'm not a huge fan of the group by feature in Tableau as it has give me some unexpected behavior in the past.

There are a few approaches I would recommend trying. One is spelled out well here by using the bin functionality built into tableau. https://community.tableau.com/thread/188952

It sounds like you have some irregular bin sizes you're looking for, in which case you could create a separate calculated field with a series if else statements based on the range of [FP - Days after NTC] and assign a string to each 'grouping'

Lastly, I've not done an LOD of this style with two dimensions "FP - Days after NTC". You only appear to have COUNTD(submission days) on the view shelf. I would verify that you are getting the results you are expecting. And if not, you could create a separate calculated field that is a concatenation of [Rcip Id] and [NTC Submission Date] on which to based your LOD calculation, and then you can use COUNTD on that new field.

EDIT: It was suggested to try using a computed field instead of a group and/or concatenate RCIPID and NTC Date. I tried both and neither affected the result.

enter image description here