Blog

Calculating product of values in a column in SQL and its business usecase


SQL supports most aggregate functions except one fundamental aggregation to calculate product of values in a column. If you are wondering what could be a scenario where you may have to calculate product of values in a column, here is a business scenario that demands it. Business Scenario: For the sake of brevity, let's say... Continue Reading →

Why is SQL one of the most powerful tools in the arsenal of an Analyst?


Out of information analysis, comes wisdom. It’s this information analysis that is one of the important reasons that created the need for storage of data. The world of databases was sprouted to address this need of data storage and many languages were born to interact and deal with the data stored in these databases. But... Continue Reading →

Cascading or dependent drop-down lists using Data Validation tool in Excel


If you are thinking of bringing interactivity to the reports in Excel, you may have come across the need for having a simple drop-down list or a more complex cascading drop-down list (i.e., a drop-down list whose values are dependent on the value already selected in another drop-down). Example Scenario: For example, say, you have... Continue Reading →

Calculating Age (duration or difference between two dates) in years, months and days in Power Query M Script


16-Jul turns out to be the birthday of Microsoft Power BI. Here I post a formula in M Script to calculate the age (i.e., duration or difference between two dates) in years, months and days: let Source= [ PowerBIBDay = #date(2014, 7, 16), Today = Date.From(DateTime.LocalNow()), BirthdayFactor = if Date.DayOfYear(PowerBIBDay)<Date.DayOfYear(Today) then 0 else 1, DayFactor... Continue Reading →

A magical Excel trick for flattening data copied from a PivotTable report in tabular layout into usable format


Here is a scenario that I come across sometime ago when I received an Excel file with some apparently messy data for further processing to generate another report. The data in the file appear similar to below screenshot. This data is self-explanatory. It’s the sales in units and dollars of each product under each product... Continue Reading →

New function in Excel 2016 to display in a cell, the formula contained in another cell


You must have come across a number of situations when you were trying to explain a formula that you have written in Excel and the result of the formula. This kind of situation basically demands both the formula expression and the formula result to be displayed simultaneously. For example, from the below screenshot, if you... Continue Reading →

Trick for Listing the names of all sheets in Excel workbook


Here is a 2 step technique to retrieve the names of all sheets in Excel workbook: Step:1. First define a named range using the below formula: Step: 1a. Click “Define Name” command in “Define Names” group under “Formulas” ribbon tab to invoke “New Name” dialogue Step: 1b. Let the name of the range be “SheetNames”... Continue Reading →

Up ↑

%d bloggers like this: