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 / Display Quarter from a...
Power Apps
Unanswered

Display Quarter from a SharePoint list

(0) ShareShare
ReportReport
Posted on by 223

Good day,

I have a SharePoint list with a Start date column and another column (Q) that captures the quarter. When a user selected a date from the calendar, It shows the Quarter that will then be stored in the Q Column of SP. In Power Apps, i added a form to show SP list information. In the form, When a user selects a date, then it should display the Quarter of the Year. I was able to this by using the below code in a label called (qt)

 

 

If(Month(dt) in [1,2,3],Date(Year(dt),3,31),If(Month(dt) in [4,5,6],Date(Year(dt),6,30),If(Month(dt) in [7,8,9],Date(Year(dt),9,30),Date(Year(dt),12,31))))

 

 

where dt (label) is the Start Date Column . My question is

1. I would like to show it in Text eg, Instead of 1/3/2023, it should be Quarter 1 or 1/6/2023, Quarter 2 etc. As depicted below

 

SP List (This is what I get) SP List (This is what I want)   
TitleStartDateQuarterTitleStartDateQuarter
A1/2/202331/3/2023A1/2/2023Q1
B1/4/202330/6/2023B1/4/2023Q2
C1/11/202331/12/2023C1/11/2023Q4

 

2. A user should not be able to select a date that is earlier than the start date in the form. eg, If Start Date is 2/20/2023, The user should not be able to select a from 2/19/2023 downwards.

 

Thanks.

Categories:
I have the same question (0)
  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @caslasgee ,

     

    For your first request to show text please try the below formula. 

    If(Month(DatePicker) in [1,2,3],"Q1", Month(DatePicker) in [4,5,6],"Q2",Month(DatePicker) in [7,8,9],"Q3",Month(DatePicker) in [10,11,12],"Q4")

     

     

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    If(Month(dt) in [1,2,3],"Q1",If(Month(dt) in [4,5,6],"Q2",If(Month(dt) in [7,8,9],"Q3","Q4")))

     

    Insert a lable. Text of the label: "Selected date can not be less than start date".

    Visible property of that label: DatePicker1.SelectedDate < StartDate.

    So every time user selects a date that is less that start date this lable will be visible and give indication to user.

  • caslasgee Profile Picture
    223 on at

    @zmansuri, @PriyankaGeethik . Thanks for your responses. Both codes worked. What if i want a Quarter continuation? From your codes, it stops in Q4, (Let say Q4 is December 2023). What if i want it to continue to the next year (Q5, March 2023)?

     

    Thanks.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard