User Profile
JavidM
New Member
Joined 3 years ago
User Widgets
Contributions
Re: Compare Date Column with current date
Alternatively, you can use the following M code without converting the Date column into datetime format: = Table.AddColumn(#"Changed Type", "Custom", each if [Date] > DateTime.Date(Date.EndOfMonth(DateTime.LocalNow())) then 0 else [Amount]) Hope this helps!1.8KViews1like1CommentRe: Compare Date Column with current date
You can use the following M code: = Table.AddColumn(#"Changed Type1", "Custom", each if [Date] > Date.EndOfMonth(DateTime.LocalNow()) then 0 else [Amount]) Bear in mind that you have to convert the date column to datetime format before applying the function.1.8KViews0likes0CommentsRe: Compare Date Column with current date
Hi there, If I understood your question correctly, you want to show the amounts up until the current month (May 2023) leaving zeros for all consecutive months. So, when we are in June 2023, the data will appear for the respective month only leaving July and future months as 0. You can try using the following DAX function: New Column = IF('Table'[Date].[Date] > EOMONTH(TODAY(), 0), 0, 'Table'[Amount]) Let me know if it worked! Thanks!1.8KViews0likes0Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.