Posts

How we Reduced 98.9% Load Time for a Tableau Viz that used Multiple OR Conditions?

Image
 If you don’t write efficient calcs, it can slow down your dashboard.  In this article, we will show you how to speed up OR statements with multiple conditions in Tableau. You can also look this video to see how we did it! The Workbook Loaded in 41 Seconds The dataset had information about flights. We wrote a simple calculation to compare a value against a list of values: The workbook took 41 sec to load. The above calculation has a series of conditions which get evaluated one by one. The more conditions you have, the more time it takes. The more rows (data) you have, the more time it takes. We Modified the Calculation to use ‘IN’ Function IN statement directly compares a dimension against a list – much simpler & faster. So, we modified the calc to use IN statement instead of OR statement. Now, the same workbook took 29 sec to load in Tableau– that is 29% lesser time . To improve further, we switched to an Extract connection. Then, it took just 0.43 s...

Customer Lifetime Value

Image
  1.1 What is Customer Lifetime Value Customer Lifetime Value (CLV), putting in simple terms, is the worth of a customer to a business for the complete period of their relationship, or the total amount of money, a business can expect from the customer during their lifetime. Revenue generated by the customer varies for each customer business pair individually. For a business, a customer might be worth a million, but a second customer might be worth nil, or maybe the first one might worth nil for another business. CLV can be used as a metric of profit associated with a customer-business relationship. A fast way for determining a customer’s profitability and the potential for the company to develop over the long run is to compare the customer lifetime value against the cost of acquiring a new client. Customer profitability, sometimes referred to as CP (the difference between the revenues and the expenses connected with the customer connection ...

Exploratory Factor Analysis in R

Image
Changing Your Viewpoint for Factors In real life, data tends to follow some patterns but the reasons are not apparent right from the start of the data analysis. Taking a common example of a demographics based survey, many people will answer questions in a particular ‘way’. For example, all married men will have higher expenses than single men but lower than married men with children. In this case, the driving factor which makes them answer following a pattern is the economic status but these answers may also depend on other factors such as level of education, salary and locality or area. It becomes complicated to assign answers related to multiple factors. One option is to map variables or answers to one of the factors. This process has a lot of drawbacks such as the requirement to ‘guess’ the number of factors, heuristic based or biased manual assignment and non-consideration of influence of other factors to the variable. We have variables and answers in the data defined in a way suc...

Implementing Parallel Processing in R

 If something takes less time if done through parallel processing, why not do it and save time? Modern laptops and PCs today have multi core processors with sufficient amount of memory available and one can use it to generate outputs quickly. Parallelizing your codes has its own numerous advantages. Instead of waiting several minutes or hours while a task completes, one can replace the code, obtain output within seconds or minutes and make it efficient at the same time. Code efficiency is one of the most sought abilities in the industry today and not many people are able to use it. Once you learn, how to parallelize your code, you will only regret that why didn’t you learn it sooner. Parallelizing your codes in R is simple and there are various methods and packages. Let’s look at some of the functions available in R lapply() and sapply() functions lapply() function is used to apply a specified function to the vector or list input. The output of this function is always a list. lappl...

How we reduced 99.6% in load time of a Tableau Workbook with 112 million string Calcs?

Image
 String calculations take up a lot of processing power. When you have lots of string calcs, it can slow down a dashboard. In this article, we will show you how we reduced the time by 99%. We help clients achieve similar results through our Tableau Consulting Services. You can also look this video to see how we did it! The Dataset had 28 million Rows and 112 million Calculations It was a movie review dataset. We extracted the year in which the move was released which was embedded in the movie title. E.g., ‘The Shawshank Redemption (1994)’, with even multiple parentheses in some cases. We wrote 4 new calculated fields, using string functions, to extract the movie year. An example calculation is shown below: So, it has 112 million calcs (4 row level string calcs * 28 million rows). The Viz Loaded in 7.9 Minutes! A simple viz that shows #movies and #reviews by movie year, took 7.9 mins to load! We feel dashboards should be fast that they don’t delay the speed of our thought process. A...