Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have a measure like this
Solved! Go to Solution.
 
					
				
		
Hi @bml123 ,
I used group by and Table.Min to get the dates.
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckwuySxLVdJRMjIwMtI10jUFMg2VYnUwZUxATKwyZkCmMVjGMy8RRc5Q1wjINMEhZwhkmuKQMwYyzZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Status = _t, ExtractDate = _t, Index = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Status", type text}, {"ExtractDate", type date}, {"Index", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Status"}, {{"Count", each _, type table [Status=nullable text, ExtractDate=nullable date, Index=nullable number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.Min([Count],"ExtractDate")),
    #"Expanded Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"ExtractDate"}, {"ExtractDate"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Custom",{{"ExtractDate", "ActiveMinDate"}}),
    #"Expanded Count" = Table.ExpandTableColumn(#"Renamed Columns", "Count", {"ExtractDate", "Index"}, {"ExtractDate", "Index"})
in
    #"Expanded Count"Input:
Output:
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 
					
				
		
Hi @bml123 ,
I used group by and Table.Min to get the dates.
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckwuySxLVdJRMjIwMtI10jUFMg2VYnUwZUxATKwyZkCmMVjGMy8RRc5Q1wjINMEhZwhkmuKQMwYyzZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Status = _t, ExtractDate = _t, Index = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Status", type text}, {"ExtractDate", type date}, {"Index", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Status"}, {{"Count", each _, type table [Status=nullable text, ExtractDate=nullable date, Index=nullable number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.Min([Count],"ExtractDate")),
    #"Expanded Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"ExtractDate"}, {"ExtractDate"}),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Custom",{{"ExtractDate", "ActiveMinDate"}}),
    #"Expanded Count" = Table.ExpandTableColumn(#"Renamed Columns", "Count", {"ExtractDate", "Index"}, {"ExtractDate", "Index"})
in
    #"Expanded Count"Input:
Output:
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@bml123 , In Power Query you can only create a column not measure
Power Query - List.Min and List.MinN https://youtu.be/9wYdttOPWaQ
You can List.Select https://docs.microsoft.com/en-us/powerquery-m/list-select
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 80 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |