
1. Re: Assistance required with a “Conditional Calculated Field”
Ashish Chaudhari Aug 7, 2016 10:02 PM (in response to Lance Martens)1 of 1 people found this helpfulHi Lance Martens,
Please update the below calc.
Shearer Cutting Direction
IF [Shearer Direction]="L" and [Shearer Cutting]=TRUE THEN 'MG'
ELSEIF [Shearer Direction]="R" and [Shearer Cutting]=TRUE THEN 'TG'
ELSEIF ([Shearer Direction]="L" or [Shearer Direction]="R") and [Shearer Cutting]=FALSE THEN 'Not Satisfied'
END
Please refer to the screenshot for reference and confirm the output.
Let me know if that helps.
Thanks and Regards,
Ashish Chaudhari

2. Re: Assistance required with a “Conditional Calculated Field”
Ashish Chaudhari Aug 7, 2016 10:03 PM (in response to Lance Martens)Please find the attached workbook for reference.
Ashish

D404  TS Copy.twbx 45.2 KB


3. Re: Assistance required with a “Conditional Calculated Field”
Lance Martens Aug 8, 2016 1:43 AM (in response to Ashish Chaudhari)Hi Ashish,
Thanx for the “Shearer Cutting Direction” calculation you were spot on mate,
I did a quick logic test “Raw data vs. what the viz displays” and realised my “Shearer Cutting” calculation I configured is not true every time,
I would appreciate it if you can take a look please?
Error Example:
 My “Shearer Cutting” calculated field [Shearer Speed] >=4.4 and ([LH Cutter Amps] >=50 or [RH Cutter Amps] >=50)
 You will notice that for the raw data string, the LH and RH Cutter Amps are not >=50, but the Shearer Speed is > = 4.4 (29.7)
 The way I was reasoning was that “Shearer Cutting” if Both Shearer speed and Cutters are greater than the measures in the formula, I just realised that as in this case the cutters are < 50 but the shearer is still moving at high speed > = 4.4 (29.7)
 Is there a way to redo my “Shearer Cutting” calculated field as follows:
 If [Shearer Speed] >=4.4 and ([LH Cutter Amps] >=50 or [RH Cutter Amps] >=50) then the “Shearer is Cutting”
 If [Shearer Speed] >=4.4 and ([LH Cutter Amps] <=50 or [RH Cutter Amps] <=50) then the “Shearer is Flitting”
Not sure how this will influence the “Shearer Cutting Direction” calculation you configured earlier?
Thanx again for the support Ashish!
Lance

4. Re: Assistance required with a “Conditional Calculated Field”
Ashish Chaudhari Aug 8, 2016 2:43 AM (in response to Lance Martens)1 of 1 people found this helpfulHi Lance,
It did affect the Shearer Cutting Direction calculation. Let try to fix first part where you are trying to redefine the Shearer Cutting calculation first. Once you approve if below calc works for you then we can go ahead defining the direction of the same.
Check this one and let me know if this helps.
if (([Shearer Speed] >=4.4 and ([LH Cutter Amps] >=50) or [RH Cutter Amps] >=50)) = TRUE then "Shearer is Cutting"
ELSEIF ([Shearer Speed] >=4.4 and ([LH Cutter Amps] <=50 or [RH Cutter Amps] <=50)) = TRUE then "Shearer is Flitting"
ELSE "No Condition, That why Null (No Futher Categorisation)"
END
As you can see the last else condition I have write as No condition bla bla. This is because there are few other conditions that lies in your data which are not covered in the this calculation. For all those rows it is returning "Null" value.
If possible let me know if there are any other conditions so that we can avoid "NULL"
After putting this calculation to the filter section, you will get below selection options as suggested by you.
Try the above calc and let me know if it works for you or not. If needed we can modify the same as per what is exactly required.
Ashish

5. Re: Assistance required with a “Conditional Calculated Field”
Lance Martens Aug 8, 2016 8:39 PM (in response to Ashish Chaudhari)Hi Ashish,
Cheers for your continued support mate, much appreciated!
Feedback:
 Regarding the new “Shearer Cutting (New Logic)” formula, there really is only “3 Conditions” we will need to ever consider, namely:
1. Shearer is Cutting
2. Shearer is Flitting
3. Shearer is Not Cutting
 I have changed the last part of the calc “ “ results to match the three conditions,
Shearer Cutting (New Logic) formula:
if (([Shearer Speed] >=4.4 and ([LH Cutter Amps] >=50) or [RH Cutter Amps] >=50)) = TRUE then "Shearer is Cutting"
ELSEIF ([Shearer Speed] >=4.4 and ([LH Cutter Amps] <=50 or [RH Cutter Amps] <=50)) = TRUE then "Shearer is Flitting"
ELSE "Shearer is Not Cutting"
END
 I then attempted to create a new “Shearer Cutting Direction (New Logic)” formula but there appears to be a conflict?
 Regarding the new Shearer Cutting Direction (New Logic)” formula there is now “4 Conditions” we will need to consider, namely:
1. Shearer Cutting to MG
2. Shearer Cutting to TG
3. Shearer Stopped
4. Shearer is Flitting
 I have no idea how to introduce the “Shearer is Flitting” measure into the formula below, and as mentioned there is a conflict present,
Shearer Cutting Direction (New Logic) formula:
IF [Shearer Direction]="L" and [Shearer Cutting (New Logic)]=TRUE THEN 'Shearer Cutting to MG'
ELSEIF [Shearer Direction]="R" and [Shearer Cutting (New Logic)]=TRUE THEN 'Shearer Cutting to TG'
ELSEIF ([Shearer Direction]="L" or [Shearer Direction]="R") and [Shearer Cutting (New Logic)]=FALSE THEN 'Shearer Stopped'
END
………. “Shearer is Flitting”……..?
I have attached my Workbook, latest now_v3
Cheers,
Lance

6. Re: Assistance required with a “Conditional Calculated Field”
Ashish Chaudhari Aug 8, 2016 9:51 PM (in response to Lance Martens)1 of 1 people found this helpfulHi Lance,
Thanks for providing the necessary details. Please find the below calculation for "Shearer Cutting Direction (New Logic)"
IF [Shearer Direction]="L" and [Shearer Cutting (New Logic)]="Shearer is Cutting" THEN "Shearer Cutting to MG"
ELSEIF [Shearer Direction]="R" and [Shearer Cutting (New Logic)]="Shearer is Cutting" THEN "Shearer Cutting to TG"
ELSEIF ([Shearer Direction]="L" or [Shearer Direction]="R") and [Shearer Cutting (New Logic)]="Shearer is Not Cutting" THEN "Shearer Stopped"
ELSE "Shearer is Flitting"
END
Also attaching the .twbx file along with it for your reference. Let me know if that helps.
Also find the screenshot and confirm the output.
Thanks and Regards,
Ashish Chaudhari

7. Re: Assistance required with a “Conditional Calculated Field”
Lance Martens Aug 8, 2016 10:55 PM (in response to Ashish Chaudhari)Hi Ashish,
You nailed it mate! My dashboard is functioning beautifully!
I have also been able to broaden my understanding of calculated fields Thanx to you!
PS!
Can I ask that you follow me in the forum so I can bounce ideas off you on occasion?
Cheers,
Lance

8. Re: Assistance required with a “Conditional Calculated Field”
Ashish Chaudhari Aug 8, 2016 11:17 PM (in response to Lance Martens)Hi Lance,
I have followed you back.
Good efforts at your end as well, since you gave me appropriate information required by highlighting and making changes to the fields everytime. This has helped me to work mechanically due to which this question solved quickly, else it would have taken **** lot of time since I am not aware of this domain. Keep doing that for upcoming posts, you will get instant results for it. Best part was you knew your data well.
Thanks for closing thread.
Ashish