Creating UDDC expressions

Modified on Thu, 14 Mar 2024 at 01:54 PM

How to create complex UDDC expressions

Advanced Custom measure columns can be created as per the analysis requirement by performing various string, arithmetic, date, statistics, trigonometry, or conditional statements using various arithmetic operators (such as +, -, /, etc.) or comparison operators (such as =, >, < etc.).



Example 1:

How to calculate the Delay in delivery performance. 

'Planned Delivery Date' is the delivery date proposed considering the planned delivery time and Actual delivery date is the date on which the goods are actually delivered to the customer.

UDDC Name : Delay in days

UDDC Formula : (noOfDaysByDate(Planned delivery date, Actual delivery date))

The delay days are the total difference between the planned delivery date and actual delivery date.

e.g: Planned delivery date = 01/31/2015 & Actual delivery date = 03/20/2015. Therefore the delay days are 48 days. 


Example 2:

How to calculate the Monthly run rate of various products.

Sales Amount is the total amount achieved (Sales Qty * Sales Price).

UDDC Name 1 : DayslapsedFYear - Lapsed Days in the Financial year

UDDC Formula : noOfDaysByDate(date(((ifCase(month(today())<4,(year(today()))-1,year(today()))))+"- 04-01"),today()) 

e.g: Consider today is 7th November 2015. DayslapsedFYear as per the formula will be the number of days between the financial year start date (1st April 2015) and today, which is 221 days.

UDDC Name 2 : TotaldaysFYear (Total days in the Financial Year)

UDDC Formula : (noOfDaysByFrequency("y", 0,true)+1)

e.g: Total days in this financial year (from 1st April 2015 to 31st March 2016), which is 365 days.

UDDC Name 3 : MonthlyRunRate

UDDC Formula : (SalesAmount / DayslapsedFYear) * (TotaldaysFYear/12)

The monthly run rate can be calculated by dividing the sales amount by the total lapsed days in the financial year and multiplying it with the average number of days in a month (Total days in the financial year / 12).

e.g: Consider today is 7th November 2015. SalesAmount = 90,629.50, TotaldaysFYear=365 and DayslapsedFYear=221.

Therefore MonthlyRunRate ( (90,629.50 / 221)*(365/12)) is 12,507.


Example 3:

How to find out Employee Attrition Rate for a particular department.

'Opening count' is the opening count of the employees, 'no. Of attritions' is the number of Employees left from the department and 'New Joined' is the number of Employees joined to the department.

UDDC Name : Attrition

UDDC Formula : ((no. Of attritions * 100) / (Opening count + New Joined)) /100.

e.g: Consider Opening count = 500, No. of attritions = 20 and New Joined = 35. According to the formula, the attrition rate will be 0.037 i.e. 3.7%.


Example 4:

How to find out the Item Stock ageing period (0-180 days, 180-365 days, and Above 365) with respect to the stock date.

'StockQuantity' is the total available stock of the item as on today and StockDate is the stock received date.

UDDC Name : Stock Ageing Period

UDDC Formula : whenThen(noOfDaysByDate(StockDate,today()),(noOfDaysByDate(StockDate,today())>0&&noOfDaysByDate(StockDate,today())<=180),"0-180days",(noOfDaysByDate(StockDate,today())<=365&&noOfDaysByDate(StockDate,today())>180),"180-365 days","Above 365") 

The Stock ageing period is calculated like this. If the number of days between stock received date and today is less than or equal to 180, then those stock will be considered under “0-180 days” stock. If it is greater than 180 and less than or equal to 365, then it will be considered under “180-365 days” stock , rest of all will come under “Above 365” days stock.

e.g: There are 240 cornflakes packets received on 8th August 2015, 70 packets on 1st July 2015, 155 packets on 2nd March 2015, 200 packets on 24th september2014, and today is 10th November 2015. 

In the ageing analysis, under “0-180 days” category, there will be 310 packets. Under “180-365 days” category, there will be 155 packets. Under “Above 365” category, there will be 200 packets.


Example 5:

How to find out Gross Profit ratio.

Gross profit ratio is a profitability ratio that shows the relationship between gross profit and total net sales revenue. Gross Profit is calculated by subtracting Sales direct income and purchase direct expense.

Sales Direct income is one which is earned directly by way of sales, TransactionDate is the sales transaction date, Purchase direct expense is the direct expense from purchasing goods, and Stock is the available goods stock.

UDDC Name 1: Gross Profit

UDDC Formula 1: ((Sales_DirectIncome+mostRecent(Stock,TransactionDate,"Sum","","") )-(Purchase_DirectExpense+leastRecent(Stock,TransactionDate,"Sum","",""))) 

In this formula, Income is added with Closing stock and Expense is added with Opening Stock.

e.g: Sales_DirectIncome = 3,05,11,178, Closing Stock = 1,67,06,432, Purchase_DirectExpense = 2,32,17,892 and Opening Stock = 1,39,92,440.

Therefore, the Gross Profit is (3,05,11,178 + 1,67,06,432) – (2,32,17,892 + 1,39,92,440) = 1,00,07,279.

UDDC Name 2: GP Ratio

UDDC Formula 2: (GrossProfit/(Sales_DirectIncome))*100 

Ratio is calculated by multiplying the Gross profit with 100 and then dividing it by Sales direct income.

e.g: The GP Ratio here is (1,00,07,279 / 3,05,11,178) *100 = 32.80% 


Example 6:

How to calculate the Price variance of different product groups.

PORate is the rate of the product in the purchase order, BillRate is the rate of the product in the bill and GRNQuantity is the product quantity in the goods received note.

UDDC Name : Price Variance

UDDC Formula : ((PORate - BillRate)* GRNQty) 

Price variance is calculated by dividing the goods receipt note quantity from the difference of purchase rate and bill rate.

e.g: PO Rate = 27500, Bill Rate = 25000 and GRN Qty = 2. Therefore the price variance is 1,250.


Note: This article is based on Smarten Version 5.x. This may or may not be relevant to the Smarten Version 5.x you may be using

UDDC Advanced Functions cross-tab Delay in delivery performance Monthly run rate Employee Attrition Rate Item Stock ageing period Gross Profit ratio Price variance

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article