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.
i do not have a datetime. date or datetime.localnow, Date.IsCurrentMonth, Date.IsInNextMonths Columns.
Any advice is helpful. Thanks!
Solved! Go to Solution.
datetime.date or datetime.localnow, Date.IsCurrentMonth, Date.IsInNextMonths are all power query functions
for example datetime.localnow() will return the current date, and Date.IsCurrentMonth returns true if the date provided as a parameter ([date end] in your case) is in the current month.
~you can read more about each function here Date functions - PowerQuery M | Microsoft Docs
basically, the code will return a 5 in [date end] is in the past,
4 if it is in the current month,
3 if next month
2 the month after that
and 1 if further n the future.
This is probably used to group and sort data in the report.
Hi they are all built in functions:
DateTime functions - PowerQuery M | Microsoft Docs
Date.IsInNextMonth - PowerQuery M | Microsoft Docs
Date.IsInNextNMonths - PowerQuery M | Microsoft Docs
The code is a bit odd though. In plain language it is doing:
If [Date End] is in the past return 5
else if [Date End] is in current month return 4
else if [Date End] + 1 month occurs in next 3 months return 3
else if [Date End] + 1 month occurs in next 6 months return 2
else return 1
datetime.date or datetime.localnow, Date.IsCurrentMonth, Date.IsInNextMonths are all power query functions
for example datetime.localnow() will return the current date, and Date.IsCurrentMonth returns true if the date provided as a parameter ([date end] in your case) is in the current month.
~you can read more about each function here Date functions - PowerQuery M | Microsoft Docs
basically, the code will return a 5 in [date end] is in the past,
4 if it is in the current month,
3 if next month
2 the month after that
and 1 if further n the future.
This is probably used to group and sort data in the report.
@Anonymous , at a high level this seems fine.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
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 |
---|---|
100 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
108 | |
104 | |
83 | |
73 |