Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table of two dates that I converted first to whole number to find the Minimum and Maximum values. I want to have a table with the Minimum and Maximum dates from the original Table for each column.
Here is my code
let
Source = CYMHQ3,
CalcReponseMin = List.Min(Source[Response Date]),
CalcReponseMax = List.Max(Source[Response Date]),
CalcSendRecievedMin = List.Min(Source[SendRecieved]),
CalcSendRecievedMax = List.Max(Source[SendRecieved])
in
Source
I don't know how to reference the calculated in the formulas above in new columns to create a new table.
I would like to have the table look like this:
CalcReponseMin | CalcReponseMax | CalcSendRecievedMin | CalcSendRecievedMax
44413 | 44477 | 44287 | 44462
Here is my data.
Response Date | SendRecieved |
44477 | 44474 |
44477 | 44474 |
44477 | 44460 |
44474 | 44411 |
44474 | 44462 |
44455 | 44455 |
44455 | 44455 |
44455 | 44455 |
44455 | 44455 |
44455 | 44455 |
44455 | 44455 |
44432 | 44431 |
44432 | 44431 |
44432 | 44431 |
44432 | 44431 |
44432 | 44431 |
44432 | 44421 |
44432 | 44421 |
44432 | 44431 |
44432 | 44420 |
44432 | 44420 |
44432 | 44420 |
44432 | 44420 |
44432 | 44420 |
44432 | 44420 |
44413 | 44305 |
44413 | 44305 |
44413 | 44287 |
44413 | 44287 |
44413 | 44287 |
44413 | 44378 |
44413 | 44287 |
44411 | 44385 |
44411 | 44385 |
44411 | 44349 |
44411 | 44350 |
44391 | 44375 |
Solved! Go to Solution.
@STIBBS_807 #table - PowerQuery M | Microsoft Docs
SOLUTION:
let
Source = CYMHQ3,
CalcResponseMin = List.Min(Source[Response Date]),
CalcResponseMax = List.Max(Source[Response Date]),
CalcSendRecievedMin = List.Min(Source[SendRecieved]),
CalcSendRecievedMax = List.Max(Source[SendRecieved]),
ChangeTypeDates = Table.TransformColumnTypes(Source,{{"SendRecieved", type date}, {"Response Date", type date}}),
ResponseDateMin = Table.AddColumn(ChangeTypeDates, "ResponseDateMin", each CalcResponseMin),
ResponseDateMax = Table.AddColumn(ResponseDateMin, "ResponseDateMax", each CalcResponseMax),
SendRecieveDateMin = Table.AddColumn(ResponseDateMax, "SendRecieveDateMin", each CalcSendRecievedMin),
SendRecieveDateMax = Table.AddColumn(SendRecieveDateMin, "SendRecievedDateMax", each CalcSendRecievedMax),
RemovedOriginalColumns = Table.RemoveColumns(SendRecieveDateMax,{"Response Date", "SendRecieved"}),
RemovedDuplicatesValues = Table.Distinct(RemovedOriginalColumns),
FormatDataAsDates = Table.TransformColumnTypes(RemovedDuplicatesValues,{{"ResponseDateMin", type date}, {"ResponseDateMax", type date}, {"SendRecieveDateMin", type date}, {"SendRecievedDateMax", type date}})
in
FormatDataAsDates
SOLUTION:
let
Source = CYMHQ3,
CalcResponseMin = List.Min(Source[Response Date]),
CalcResponseMax = List.Max(Source[Response Date]),
CalcSendRecievedMin = List.Min(Source[SendRecieved]),
CalcSendRecievedMax = List.Max(Source[SendRecieved]),
ChangeTypeDates = Table.TransformColumnTypes(Source,{{"SendRecieved", type date}, {"Response Date", type date}}),
ResponseDateMin = Table.AddColumn(ChangeTypeDates, "ResponseDateMin", each CalcResponseMin),
ResponseDateMax = Table.AddColumn(ResponseDateMin, "ResponseDateMax", each CalcResponseMax),
SendRecieveDateMin = Table.AddColumn(ResponseDateMax, "SendRecieveDateMin", each CalcSendRecievedMin),
SendRecieveDateMax = Table.AddColumn(SendRecieveDateMin, "SendRecievedDateMax", each CalcSendRecievedMax),
RemovedOriginalColumns = Table.RemoveColumns(SendRecieveDateMax,{"Response Date", "SendRecieved"}),
RemovedDuplicatesValues = Table.Distinct(RemovedOriginalColumns),
FormatDataAsDates = Table.TransformColumnTypes(RemovedDuplicatesValues,{{"ResponseDateMin", type date}, {"ResponseDateMax", type date}, {"SendRecieveDateMin", type date}, {"SendRecievedDateMax", type date}})
in
FormatDataAsDates
@STIBBS_807 #table - PowerQuery M | Microsoft Docs
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 71 | |
| 50 | |
| 46 |