Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
STIBBS_807
Resolver I
Resolver I

Adding Minimum and Maximum Values From a Table converted to list

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

 

 

 

2 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

@STIBBS_807 #table - PowerQuery M | Microsoft Docs



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

STIBBS_807
Resolver I
Resolver I

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

View solution in original post

2 REPLIES 2
STIBBS_807
Resolver I
Resolver I

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

Greg_Deckler
Community Champion
Community Champion

@STIBBS_807 #table - PowerQuery M | Microsoft Docs



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors