Skip to main content

Hi all,

 

I'm currently trying to count the cases in a 14-Day Period.

I was able to calculate the time difference between rows using Lookup function, but came across two issues.

 

1) time difference between ID 1 and 2 is 10 days, so two cases with in a 14-day period, City Aa's total count is 2, but I don't know how to include ID 1 . The time difference is applied to the previous case, so ID 1 has "null" for time difference.

Count Cases in a 14-Day Period (Stuck After Lookup Function)2) Since I'm using table calculation, when I remove time field, everything breaks. I need to count the cases in a 14-day period by city (highlighted in yellow)...

 

image 

What I want is this.

image 

Is this something we can do w/ Tableau? if not, any workarounds? I attached the sample file.

 

Thank you for your help!!

1 answer
  1. Feb 25, 2022, 8:30 PM

    @Willy Berthelot​ 

    Hi, in this case I think you should use Tableau Prep:

    @Willy Berthelot​ Hi, in this case I think you should use Tableau Prep:Attached you can find a flow with your data. If this post resolves the question, would you be so kind toAttached you can find a flow with your data.

     

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego

    Tableau Ambassador

0/9000