Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi to all. I am struggling with how to grab from another column the most recent date and with that date populate an entire new custom column.
The Meeting Date column is Date format.
I have tried these formulas with no success:
List.Max(Date.From[Meeting Date])
Date.From(List.Max([Meeting Date])) (tried both ways to see if anything worked)
I can't believe I'm missing this and will really appreciate anyone who can tell me what I am missing.
David
Solved! Go to Solution.
@Vauban , I echo Matt's statement in that I don't understand the end goal, but this is the M code you get you the max date from a column:
Add_CustomColumn = Table.AddColumn( Previous_Step, “Custom Column”, each List.Max(Previous_Step[Meeting Date]), type date)
You can reference a list with the symtax TableName[ColumnName]. You can add your additional logic to this pattern.
Just replace Previous_Step with the name of your step right before it in the query
Keep in mind that the step name Filtered Rows is actually #"Filtered Rows" in the advanced editor. Name your steps with no spaces and you can avoid the #"" syntax.
I think the bigger issue is “why are you trying to do this”? Many new users treat data in Power BI as if it were Excel, but of course it is not Excel. What are you trying to do?
@Vauban , I echo Matt's statement in that I don't understand the end goal, but this is the M code you get you the max date from a column:
Add_CustomColumn = Table.AddColumn( Previous_Step, “Custom Column”, each List.Max(Previous_Step[Meeting Date]), type date)
You can reference a list with the symtax TableName[ColumnName]. You can add your additional logic to this pattern.
Just replace Previous_Step with the name of your step right before it in the query
Keep in mind that the step name Filtered Rows is actually #"Filtered Rows" in the advanced editor. Name your steps with no spaces and you can avoid the #"" syntax.
Thank you to both for your thoughts and the solution. My Excel roots haunt me but for the now I just needed an intermediate step to evaluate when meetings where past a certain date.
All the best,
David
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |