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 / Sum values between sel...
Power Apps
Unanswered

Sum values between selected Value range

(0) ShareShare
ReportReport
Posted on by 12

I have created two dropdown for Period in PowerApp Form, Start Period and End Period. In Total Week (number field) I am trying to calculate  weeks between two selected Period based on below table. I tried below formula but not working. Please provide your expertise!
Sum(Filter(Year_1,Period>=Dropdown11_1.SelectedText.Value,Period<=Dropdown18_1.SelectedText.Value),Weeks)
VP821_0-1697049652956.png

 

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,603 Super User 2025 Season 2 on at

    Hi @VP821 

     

    SelectedText is (Deprecated).

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-drop-down

     

    Please adjust the code:

    Sum(
     Filter(
     Year_1,
     Period>=Dropdown11_1.Selected.Value,
     Period<=Dropdown18_1.Selected.Value
     )
    ,Weeks
    )

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

  • VP821 Profile Picture
    12 on at

    I really appreciate your quick input!
    I copied though not working. Is there anything wrong I am doing?

    VP821_1-1697058797170.png

     

     

  • SpongYe Profile Picture
    5,603 Super User 2025 Season 2 on at

    Is there any error that your getting?

  • VP821 Profile Picture
    12 on at

    It's not performing calculation and errors are as below.

    "Invalid argument type. Expecting one of the following: Number, Decimal, Date, Time, DateTime, UntypedObject."

    VP821_0-1697061799749.png

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    HI @VP821,

    Are you sure you Filter() function does return records?

    Could you please make sure that your Filter() function returns some records instead of blank records?

  • VP821 Profile Picture
    12 on at

    Your point is correct, filter is not working.
    Any suggestion on how to perform this Sumifs in PowerApps?

    VP821_0-1697121821025.png

     



  • v-qiaqi@microsoft.com Profile Picture
    on at

    HI @VP821,

    Check the following steps:

    1). How you set the Items property pf the Dropdown11_1 and Dropdown18_1?

    2). I guess the Period is a text type column, then how could you compare it using ">" or "<"?

    3). Please answer the above questions so that we could help you figure it out.

  • VP821 Profile Picture
    12 on at

    Thanks for reply!

    1). Dropdown11_1 and Dropdown18_1, Item: Distinct(Year_1,Period) (If I understand correctly, else please guide me where to check property)

    2). Yes, Period is Calculated (concatenate) SharePoint column based on both TEXT column Month and Year.

     

    My background is non-IT, I just came across PowerApps to ease my Finance Project Tracking in SharePoint and started researching. So, I am not keen to use that formula, any suggestions appreciated! 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @VP821,

    Tips:

    1). Power Apps does not work well on calculated columns from SharePoint list, we do calculation directly in Power Apps.

    2). The way you compare the period with the dropdown selected value is wrong

    3). Power Apps only supports to compare with the date time, number value. You have text string in your period, Power Apps could not works on it

     

    How to set the data depends on your side, however, you should know the logic that how Power Apps deal with data comparison.

  • VP821 Profile Picture
    12 on at

    Thanks for guidance!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard