Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi guys,
i would need to include a query (in PQ) /dax formula in (power pivot) to make a file crash at a specific date in the future.
anyone knows a way to achieve the goal?
I would not want to use additional VBA code
Thanks in advance for any suggestion
Bye
Luca
Hi, @LucaA
If you want to use the latest file, you may try to create a function in Power Query, which always loads the newest created file using folder connector.
First you need to create a blank query and paste the codes in 'Advanced Editor'.
let
Source = (Path as any) => let
Source = Folder.Files(Path),
Custom1 = Table.SelectRows(Source,each [Date created]=
Table.Max(Source,"Date created")[Date created]
)
in
Custom1
in
Source
Finally you may input the folder path to get the newest created file in the folder.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you for the idea,
i will use it.
but what i can do if the file has been downloaded in local?
thanks
Luca
So you want to sabotage the file?
Yes, something like that. I need to stop the use of an old version and be sure that anyone is using the new one at a specific date in the future.
Not sure if I get your question right, What do you mean by Crashing the excel sheet?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.