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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
In Power Query, I have a table which has a date column. I want to write a custom column that checks if the date is the minimum date for that field, then return true, else false.
if List.Contains({List.Min(#"Table"[Date])},[Date]) then true else false
Do I need to have a separate object for comparison? I would never use this minimum date in another location, and if possible would like to avoid creating a referenced table or something similar.
Solved! Go to Solution.
Hi @Anonymous,
To get the minimum date in a column, please refer to this syntax:
AddCustom = Table.AddColumn(PreviousStep, "Custom", each List.Max(PreviousStep[a]))
Then, wrap above step inside an if condition.
= Table.AddColumn(#"Changed Type", "Custom.1", each if [Date]=List.Min(#"Changed Type"[Date]) then "true" else "false")
Best regards,
Yuliana Gu
Hi @Anonymous,
To get the minimum date in a column, please refer to this syntax:
AddCustom = Table.AddColumn(PreviousStep, "Custom", each List.Max(PreviousStep[a]))
Then, wrap above step inside an if condition.
= Table.AddColumn(#"Changed Type", "Custom.1", each if [Date]=List.Min(#"Changed Type"[Date]) then "true" else "false")
Best regards,
Yuliana Gu
Hello @v-yulgu-msft,
what condition would I need to add in order to get the minimun date for each site?
Best Regards
@ratercero I ended up just bringing in a second reference to the table for another situation, grouping on the ID and value, then merging it in to make it work. I found that even if I could make more of it work in a single step that it ended up hurting readability for anyone else coming in after me.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |