Intro
Refer to this article when you need to perform mathematical transforms using Beast Mode.
Translating Hexadecimal to Decimal
Use the following Beast Mode to translate hexadecimal values to decimal:
(CASE
when RIGHT(LEFT(`_id_$oid`,1),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,1),1)*POWER(16,7)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,1),1)) 9)*POWER(16,7)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,2),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,2),1)*POWER(16,6)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,2),1)) 9)*POWER(16,6)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,3),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,3),1)*POWER(16,5)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,3),1)) 9)*POWER(16,5)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,4),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,4),1)*POWER(16,4)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,4),1)) 9)*POWER(16,4)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,5),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,5),1)*POWER(16,3)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,5),1)) 9)*POWER(16,3)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,6),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,6),1)*POWER(16,2)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,6),1)) 9)*POWER(16,2)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,7),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,7),1)*POWER(16,1)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,7),1)) 9)*POWER(16,1)
END)
(CASE
when RIGHT(LEFT(`_id_$oid`,8),1) in ('1','2','3','4','5','6','7','8','9','0')
then RIGHT(LEFT(`_id_$oid`,8),1)*POWER(16,0)
else (INSTR('abcdefghijklmnopqrstuvwxyz',RIGHT(LEFT(`_id_$oid`,8),1)) 9)*POWER(16,0)
END)
Calculating X-bar
Let's say you are trying to create a control chart and need to start by calculating the Xbar. For example, you may have multiple inventory transactions that have occurred during one day per week during a particular period. The Xbar calculation would be the sum of the transactions during the period divided by the number of transactions, by inventory class.
For example:
Nov 1. Inventory Class 1 transactions: 1200+1400+1000+800. Calculation : 4400/4 = 1100
Nov 2. Inventory Class1 transactions: 1000+700+1300. Calculation: 3000/3 = 1000
Nov 3. Inventory Class1 transactions: 1200+500+500+1000. Calculation: 3200/4 = 800
So the points to plot for Inventory Class1 would be 1100, 1000 and 800.
Comments
0 comments
Please sign in to leave a comment.