top of page
V E Meganathan
Admin
More actions
Profile
Join date: Apr 14, 2022
Posts (151)
Mar 17, 2026 ∙ 1 min
Add Multiple Columns at One Step - Power Query
The input table includes a Date column. The objective is to add Multiple columns simultaneously, including Year, Quarter, and Month. Method-1: let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], ChType = Table.TransformColumnTypes(Source,{{"Date", type date}}), Result = Table.SplitColumn(ChType, "Date", each {_, Date.Year(_), Date.QuarterOfYear( ), Date.ToText( ,"MMM")}, { "Date","Year","Qtr","Month" }) in Result Method-2: let Source = Excel.CurrentWorkbook(){[Name="Table1"]}...
8
0
Mar 6, 2026 ∙ 1 min
Reverse Columns Using the MAP Function in Excel
The source data consists of columns labeled Cities1, Cities2, up to Cities5.Each column holds a different number of city names. The objective is to reverse the city names within each column. =LET(a,A2:E19,MAP(a,LAMBDA(x,IFERROR(INDEX(a,ROWS(TOCOL(TAKE(x:E19,,1),3)),COLUMN(x)),"")))) How It Works LET(a, A2:E19, …) Defines the working range once, making the formula cleaner. MAP(a, LAMBDA(x, …)) Iterates through each element of the range. x represents the current cell....
11
0
1
Feb 25, 2026 ∙ 1 min
Simple Example of Using THUNK in Excel
The input data includes columns for Year, Winner, and Runners-up. The goal is to calculate the count of Winners and Runners-up for each Country. Method-1: =LET(a,B2:C22,REDUCE(,MAP(UNIQUE(TOCOL(a)),LAMBDA(x,LAMBDA(z,LAMBDA(z))(HSTACK(x,BYCOL(a,LAMBDA(y,COUNTIF(y,x))))))),LAMBDA(c,w,VSTACK(IFERROR(c(),c),w())))) Here, BYCOL is evaluated first, and then the result is thunked within the MAP function. Method-2: =LET(a,B2:C22,REDUCE(,MAP(UNIQUE(TOCOL(a)),LAMBDA(x,LAMBDA(HSTACK(x,BYCOL(a,LAMBDA(y...
6
0
1
bottom of page