5 Replies Latest reply on Nov 22, 2016 8:22 AM by Amit Narkar

# IF Calculation

Job id     Reports on Time

10             1

11             1

If both the Reports on time is 1 then I need the count as 1, else 0

• ###### 1. Re: IF Calculation

Hi Divya,

Could you please give me a bit more background on this? Do you mean if 'job id 10' is on time then show a 1 or do you mean if both 'job id 10 and 11' are on time then you want to show a 1?

Regards

Matt

• ###### 2. Re: IF Calculation

Hi matt,

Thanks for the quick response.

Here is the detailed description

Jobstream I'd- job I'd-reports on time

1234                     10          1

11          1

My job stream has two jobs(10 n 11) so I need a calculation like if the

report is on time(1) for both the jobs, then my count should be 1

Else

Even if one job is not on time(report on time = 0) then count should be 0

Note : Here I have given example of only two jobs. But the calculation shud

be flexible irrespective  of no of jobs

• ###### 3. Re: IF Calculation

if {exclude [Job id]: min([Reports on Time])}=0 then 0 else 1 end

• ###### 4. Re: IF Calculation

Hello Amit,

The calculation isnt working . May be i am not clear in explantion part.

Here is a detailed Description.

jobstream id     jobid     report on time     report delayed

1                     10             1                      0

20             1                      0

30             0                      1

2                     40             1                      0

1                      0

I need the sum of reports job stream wise.

In above ex:

for Job stream id 1, Report on time is 0 for Job=30 , so on aggregate it

should be 0 for Job stream id=1

for Job stream id 2, Report on time is 1 for all jobs related to it, so on

aggregate it should be 1 .

Then on total sum of reports need to be calculated for all job streams(Here

ex: 10.....)

On Mon, Nov 21, 2016 at 9:07 PM, Amit Narkar <tableaucommunity@tableau.com>

• ###### 5. Re: IF Calculation

this is how it appears to me with below logic

if {fixed [Job Stream]: min([Report on Time])}=0 then 0 else 1 end