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 / Getting Week Columns b...
Power Apps
Unanswered

Getting Week Columns based on selected start date and end date in Canvas app

(0) ShareShare
ReportReport
Posted on by 36

I have a date pickers in canvas app to select start date and end date. week1, week2, week3, week4 has to be visible in power apps gallery or other component as shown below.

for e.g if i select date range form today i.e 18-09-2023 to 31-10-2023 then the columns in gallery has to be like given below.

week1 week2 week3 week4 week5 week6
23/09 30/09 07/10 14/10 21/10 28/10


the date mentioned below is saturday of that particular week.


for e.g if i select date range form today i.e 07-10-2023 to 28-10-2023 then the columns in gallery has to be like given below.

Week1 week2 week3 week4
07/10 14/10 21/10 28/10

 

 

Please help me achieving above requirement Thanks in advance.

 

Thanks &  Regards,

Venkatesh

I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Mahesh005 ,

     

    Please try this

    AddColumns(Filter(ForAll(Sequence(DateDiff(DatePicker1.SelectedDate,DatePicker2.SelectedDate)+1),If(Weekday(DateAdd(DatePicker1.SelectedDate,Value-1))=7,DateAdd(DatePicker1.SelectedDate,Value-1),Blank())),!IsBlank(Value)),"Week","Week"&CountRows(Filter(Filter(ForAll(Sequence(DateDiff(DatePicker1.SelectedDate,DatePicker2.SelectedDate)+1),If(Weekday(DateAdd(DatePicker1.SelectedDate,Value-1))=7,DateAdd(DatePicker1.SelectedDate,Value-1),Blank())),!IsBlank(Value)) As temp,temp.Value<=Value)))

    vxiaochenmsft_0-1695091818804.png

     

    Best Regards,

    Wearsky

  • Mahesh005 Profile Picture
    36 on at

    Hi @v-xiaochen-msft ,

     

    I need the above requirement as a columns i.e. as a headers so that one can i go and add values wrt to week1,week2 etc..

     

    week1 week2 week3 week4 week5 week6
    23/09 30/09 07/10 14/10 21/10 28/10

    10       20       30       40     50       60

     

     

    Thanks,

    Mahesh

     

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Mahesh005 ,

     

    That's impossible in canvas app. You cannot create dynamic columns in table.

     

    Best Regards,

    Wearsky

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard