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

Notifications

Announcements

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard