web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power BI Query from Po...
Power Automate
Unanswered

Power BI Query from Power Automate

(0) ShareShare
ReportReport
Posted on by 204

Hi Team,

 

Trying to get the last 2 years of data from today's date using the run a query against a dataset connector.

 

Unsure if my code is incorrect but it fails with Expression.Error: We couldn't fold the expression to the data source. Please try a simpler expression

 

Any help is greatly appreciated.

 

 

EVALUATE
FILTER (
 'vals',
 YEAR ( DATEVALUE ( [DATEEND] ) )
 >= YEAR ( TODAY () ) - 2
)

 

Categories:
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    Hi @christian12 

     

    Since you are using DirectQuery there are definitely some limitations. I dont know they all by heart.

     

    Can you try intentionally hardcoding it to just

    DATEVALUE([DATEEND]) > AnyDateFrom2YearsAgo

     

    Also I do know some of the limitations are on Date columns. So just trying to remove anything that might impact folding. as it could be a simple as you just comparing Year

     

    Also, have you thought about doing a column that makes DATEEND an actual date, and leaving the string one in so you dont need to convert it?


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 213 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 151

Last 30 days Overall leaderboard