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 →

Here is a very common exercise that you might have or may come across – You have full names of employees in a column and you are expected to extract last names from these full names into a separate column. In versions prior to Excel 2013, you need to use formulas and functions to accomplish... Continue Reading →

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 →

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 →

Generating data for populating Date Dimension table using familiar Microsoft Excel

Here I share a tricky way to create in-cell charts in Excel with an example. Below is the data of a few employees and the respective volume of requests completed by them. Now enter the below formula in cell C2 and copy it till C8. =REPT("n", B2/50)             Column C... Continue Reading →

Did you ever come across a situation where you had to compare two dates ignoring their time part to arrive at a status indicator ? Let’s see an example and the trick to address it: Example Scenario: Here you have some order ids and their respective order dates, target dates and delivery dates as in... Continue Reading →

Scenario: Here is a scenario that I have come across recently in Excel. I have the data in column that is split across multiple lines in each cell, more technically speaking, separated by carriage returns. i.e., the text in the cell is separated by pressing ALT + ENTER. see the below screenshot: Challenge: Now the... Continue Reading →

Although VLOOKUP in Excel is a very useful function, it suffers a drawback. If the lookup value to be searched is not in the first column of lookup table, VLOOKUP wouldn’t work. In the last part of this learning series, titled "VLOOKUP: Right to Left Lookup" I have taken you through a trick to address this. Here... Continue Reading →