Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Morning
Trying to set up a custom column / filter (within edit query) that gives a simple yes/no for if date created was before the 16th of the previous month.
i.e: A record created on the 19th of Jan would come back as "no" and 11th Jan would return a "yes"
Solved! Go to Solution.
hi @AHowes
In edit queries, you could use this formula to add a custom column as below:
if([Date]< #date(Date.Year(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1)),Date.Month(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1)),16) ) then "yes" else "no"
Then use this column to filter data.
and here is sample pbix file, please try it.
Regards,
Lin
hi @AHowes
In edit queries, you could use this formula to add a custom column as below:
if([Date]< #date(Date.Year(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1)),Date.Month(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-1)),16) ) then "yes" else "no"
Then use this column to filter data.
and here is sample pbix file, please try it.
Regards,
Lin
Try in edit query custom column
=Date.Day(Table[Date]) <16
Hi there, thanks for that but its not quite what I want.
Basically, I want to omit the data from the 17th of the previous month to today.
So... Currently I want to report on everything from the beginning of time to the 16th of Jan
Next month it'll be the beginning of time to the 16th of Feb
Is this possible?
See the below solution,
Sample data:
create a calculated column as below,
When filter set to false, See the result below,
result set:
If this post helps, then please consider Accepting it as the solution.
Try a custom column like this, that will return true/false and you can filter based on that
= Table[Date] <= Date.AddDays(Date.StartOfMonth(Date.AddMonths(Table[Date], -1)),15)
It may be +16
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin