Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to automatically limit my table loads to Jan 1st of 3 years ago.
I wrote this code, to give me Jan 1st of 3 years ago. I'd like that (automatically-updating) result to then filter my table loads.
= Date.StartOfYear(Date.AddYears(Date.From(DateTime.LocalNow()),-3))
And it gives the proper result.
My next step is to create a parameter that = the output above. Then I can filter by the parameter. But when I select 'Query' as the suggested value for the parameter, it doesn't show the above query as an option
Solved! Go to Solution.
@mmace1 , query used for parameter must be a list query, that's to say, the query evaluates to a list; therefore simply enclose your M code with {} to make it a list,
= {Date.StartOfYear(Date.AddYears(Date.From(DateTime.LocalNow()),-3))}
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@mmace1 , query used for parameter must be a list query, that's to say, the query evaluates to a list; therefore simply enclose your M code with {} to make it a list,
= {Date.StartOfYear(Date.AddYears(Date.From(DateTime.LocalNow()),-3))}
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Check out the July 2025 Power BI update to learn about new features.