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 Apps / automate a data change...
Power Apps
Unanswered

automate a data change for 2023

(0) ShareShare
ReportReport
Posted on by 81

Hello,

I have an application that uses an Excel database.

I would like to automate the data change of my excel tables so that the data changes on January 1, 2023 without my intervention. Indeed, each year the data of my table changes.

I thought of creating a 2022 and a 2023 column and when I make a call, I put a condition:

 

 If(Text(Year(Now()))="2022"; LookUp(TabFamilles;Famillesachats=dcFamille.Selected.Famillesachats;'2022');
LookUp(TabFamilles;Famillesachats=dcFamille.Selected.Famillesachats;'2023')) 

 

But it's not optimal, because it adds a lot of conditions in my code.

 

Thanks in advance to those who help.

Have a good day.

Categories:
  • TauGI Profile Picture
    81 on at

    I also thought of changing the name of the column dynamically:

     

    LookUp(TabFamilles;Famillesachats=dcFamille.Selected.Famillesachats;Text(Year(Now())))

     

     But I feel like the column name can't be dynamic.

    The values ​​of my database will change every year, I have to find a solution to automate the change...

     

    I'm also thinking about a power automaton flow that changes the values ​​of the excel table in 2023...

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    Hi @TauGI ,

    You cannot refer to columns dynamically in this structure, but you can do this

    LookUp(
     TabFamilles;
     Famillesachats = dcFamille.Selected.Famillesachats;
     Switch(
     Year(Today())),
     2022,
     '2022',
     2023,
     '2023',
     2024,
     '2024'
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard