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 Automate / Determining Age Range ...
Power Automate
Unanswered

Determining Age Range based on Age Variable

(0) ShareShare
ReportReport
Posted on by 2

Hello all!

 

I am really stuck here and am hoping that someone can assist with my issue. I am working on migrating a workflow from SharePoint Designer that currently calculate the cost of life insurance for an employee. The insurance costs are based on the age range you fall into. I have already calculated the age successfully and have it saved stored in a variable called 'EmployeeAge'.  Here is an example of the ranges:

 

Age RangeRate
Under 250.09
25-290.08
30-340.09
35-390.11

 

If I have an employee that has an EmployeeAge of 28, I need the Rate variable to updated with .08.

 

Does anyone have an idea of how to accomplish this cleanly? I know of a formula in excel for this and was trying to figure out how to replicate this functionality and store the age range in a variable and then add a Switch to set the Rate variable.

=LOOKUP(B2,{0,"0-24";25,"25-29";30,"30-34"})

 

I appreciate the help!!

 

~Kayne

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @kkreitzer 

     

    I have a long and dirty workaround for you that is easy to implement and undersatnd. You can create nested if conditions and manipulate variable values to get the appropriate rate. Please see the screenshots below and replicate: 

     

    I have an nteger variable that is the age and a float variable that is rate and using nested if condtion actions, i am setting the value of the rate variable. 

     

    C1.pngC2.pngHope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • v-lin-msft Profile Picture
    728 on at

    Hi @kkreitzer,

     

    Currently, there is no function that can partition Numbers in flow like excel. You can refer to the following flow to establish three conditions, which can divide Age into different data segments, then you can set the rate according to the Age.Annotation 2019-06-27 180147.png

     

    Annotation 2019-06-27 180224.png

     

    Annotation 2019-06-27 180256.png

     

    Annotation 2019-06-27 180312.png

     

    Please have a try, hopes it can help you.

     

    Best Regards,

    Community Support Team _ Lin Tu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard