The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all,
I'm using this formula in Power Query (M):
if Date.IsInPreviousNMonths([LASTMODIFIEDDATE], 3)=true then "Yes" else "No".
But why do I get No on dates between 01.04.2019 and today ? And then the "No"s starts at 28.12.2018 what is correct. I dont understand why it says No to dates in this month?
See screenshot.
Regards
Marius
Solved! Go to Solution.
Your April 1st 2019 dates are in the current month, so it cant be in the previous N months as well.
Date.IsInCurrentMonth([LASTMODIFIEDDATE])
Hi - is there a way to adjust this so that I can have a column for Previous and Current month? When I try and do two custom columns, one receives an error. Thanks!
Hi,
What is your objective. Ideally date calculations should either be calculated columns or measures.
Your April 1st 2019 dates are in the current month, so it cant be in the previous N months as well.
Date.IsInCurrentMonth([LASTMODIFIEDDATE])
thanks 🙂
How do I accept your answer as soulotion?
This works:
if Date.IsInCurrentMonth([LASTMODIFIEDDATE])=true then "Yes" else if Date.IsInPreviousNMonths([LASTMODIFIEDDATE], 3)=true then "Yes" else "No"
Glad it helped !
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
80 | |
78 | |
44 | |
39 |
User | Count |
---|---|
150 | |
116 | |
68 | |
64 | |
58 |