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 / Change Data format of ...
Power Apps
Answered

Change Data format of dropdown list

(0) ShareShare
ReportReport
Posted on by 138

Hello,

My data comes from SP, dates are in format "dd/mm/yyyy" I have a dropdown list, I need to show dates in Quarters.

Thanks,

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Hi @MSDigitalUser ,

     

    Could you try:

     

     

    Sort(
     Distinct(
     AddColumns(
     'Your Datas',
     "Quarters",
     "Q" & RoundUp(
     Month('Your Date Column') / 3,
     0
     )
     ),
     Quarters
     ),
     Value
    )

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • MSDigitalUser Profile Picture
    138 on at

    Thanks a lot Amik, one more question please, how can I refer to the new created column? 
    Like I need to filter the gallery based on the quarters now not dates.

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Hi @MSDigitalUser ,

     

    Same principle except you're going to merge a Filter condition into the expression. Apply the below to the Items property of your Gallery.

     

     

    Sort(
     Filter(
     AddColumns(
     'Your Data',
     "Quarters",
     "Q" & RoundUp(
     Month('Your Date Column') / 3,
     0
     )
     ),
     Quarters = Your_drop_down_control.Selected.Value
     ),
     Quarters,
     SortOrder.Ascending
    )

     

     

    Please note if you have a Form control associated to your Gallery, the above expression will break the Form control and you will receive an "Invalid formula. Expected a value compatible with 'DataSource' error . To fix this you will need to change the Items property of the Form to:

     

     

    LookUp(
     'Your Data',
     ID = VarRecord.ID //whatever your actual variable name is
    )

     

     

    Or:

     

     

    LookUp(
     'Your Data',
     ID = Your_Gallery.Selected.ID
    )

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • MSDigitalUser Profile Picture
    138 on at

    Am reciveing the attacdropdate.jpghed error

  • MSDigitalUser Profile Picture
    138 on at

    Am sorry again, I want to combine the below Gallery filter with the quarters filter:

    Filter(
     'ICP - Sharepoint',
     Len(DropOPU.Selected.Value) = 0 || OPU.Value = DropOPU.Selected.Value,
     Len(DropCountry.Selected.Value) = 0 || Country.Value = DropCountry.Selected.Value,
     Len(DropDate.Selected.Value) = 0 || 'Activity Planned Date' = DropDate.Selected.Value,
     Len(DropEM.Selected.Value) = 0 || 'EM ID' = DropEM.Selected.Value,
     Len(DropStatus.Selected.Value) = 0 || Status.Value = DropStatus.Selected.Value
    )



    I tried to replace " 'Activity Planned Date' with Quarters but it seems I should be adding the column "Quarters" here again 

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @MSDigitalUser ,

     

    I just ran a test out of interest and the delegation warning is not appearing in my SharePoint environment. 

     

    Amik_0-1686344239981.png

     

     

    @Ethan_R - any thoughts on this whenever you have a moment? 

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @MSDigitalUser , use:

     

     

    Filter(
     AddColumns(
     'ICP - Sharepoint',
     "Quarters",
     "Q" & RoundUp(
     Month('Date Only Column') / 3,
     0
     )
     ),
     Len(DropOPU.Selected.Value) = 0 || OPU.Value = DropOPU.Selected.Value,
     Len(DropCountry.Selected.Value) = 0 || Country.Value = DropCountry.Selected.Value,
     Len(DropDate.Selected.Value) = 0 || 'Activity Planned Date' = DropDate.Selected.Value,
     Len(DropEM.Selected.Value) = 0 || 'EM ID' = DropEM.Selected.Value,
     Len(DropStatus.Selected.Value) = 0 || Status.Value = DropStatus.Selected.Value,
     Quarters = Your_drop_down_control.Selected.Value
    )

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • MSDigitalUser Profile Picture
    138 on at

    Thanks Amik it worked 🙂

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
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard