S&B Textiles, a garments manufacturing company with in-house Knitting, Dyeing, and Garments manufacturing units, was acquired by new management while operating at a loss. Dyeing, the most critical and cost-intensive unit, consumed large amounts of electricity, gas, dyes, and chemicals, accounting for a significant portion of production costs. In particular, dyes and chemicals, which have…
Year: 2024
Transforming Operational Data into Powerful Business Intelligence Insight
In our last video https://youtu.be/yib2II91jz0, we explored the process of converting data from a manual flat-file system to a fully developed data model. If you missed it, the link is in the description below—be sure to check it out! Today, we’re taking things a step further. After implementing a fully automated system, we’ll showcase how…
SQL Data Summarizing with CTEs: A Step-by-Step Guide
SQL Data Summarizing with CTEs: A Step-by-Step Guide In data analysis, summarizing data over a specific period (e.g., monthly or yearly) is a common requirement. One effective way to achieve this in SQL is by using Common Table Expressions (CTEs). CTEs help organize queries, improve readability, and allow for more manageable and reusable logic within…
Creating Customized Fiscal Calendar Table in Power BI
Go modeling tab Create table Enter below formula CalendarTable = VAR StartDate = DATE(2000, 8, 1) // Adjust the start of your fiscal year VAR EndDate = DATE (2030, 7, 31) // Adjust the end of your fiscal year RETURN ADDCOLUMNS ( CALENDAR (StartDate, EndDate), “Year”, YEAR ([Date]), “Month”, MONTH ([Date]), …
What is SELECTEDVALUE in Power BI?
The SELECTEDVALUE function in DAX is a powerful tool designed to return a single value from a column when one, and only one, value is selected. If no value or multiple values are selected, it returns either a default value (if provided) or BLANK(). Syntax: SELECTEDVALUE(<ColumnName>[, <DefaultValue>]) How SELECTEDVALUE Works When exactly one value is selected from…
Understanding the Power of Common Table Expressions (CTEs) and RANK() in SQL
When working with relational databases, leveraging Common Table Expressions (CTEs) and ranking functions like RANK() can unlock significant potential for analyzing and organizing your data. This blog post will break down the concept of CTEs, the RANK() function, and how they can be combined effectively. What is a Common Table Expression (CTE)? A Common Table Expression (CTE) is a temporary result…
Analyzing Median, Average, and Range of Sale Prices Across Four Ontario Cities Using SQL
In this blog post, we’ll break down the SQL query provided and explain how it calculates essential statistics—namely the median, average, and range of sale prices—across four cities in Ontario: London, Waterloo, St. Thomas, and St. Catharines. The query uses window functions and aggregation to provide insightful data about the real estate market trends in…
“Finding Above-Average Earners by Department with Nested Subqueries in SQL”
A nested subquery in SQL is a query within another query. The inner query (subquery) is executed first, and its result is used by the outer query. Here’s a classic example using a nested subquery to find employees earning more than the average salary of their department. Example Schema Consider the following two tables: 2….
Using the RankX Function in Power BI for Dynamic Rankings
Power BI is a powerful tool that offers multiple ways to transform and visualize your data. One of its most helpful features is the RankX function, which allows you to rank items dynamically based on a measure, such as total sales or revenue. In this blog post, we’ll walk through a simple example of how…
Managing Dynamic Arrays in Crystal Reports: Step-by-Step Guide
Dataset of the example used Crystal Reports is a powerful tool for generating dynamic reports, and managing arrays can significantly enhance its functionality. However, Crystal Reports doesn’t directly support returning arrays from formulas, so we must work within its constraints using global variables and carefully crafted formulas. This guide walks you through how to create,…