cancel
Showing results for
Did you mean:
Level 8

## Can powerapps perform this function or is there a calculation that works for this problem

Hi,

In my app i have two datacards one datacard is a number that is updated daily ill call it 'Kilometres'  , it is a number column on sharepoint

And i have another column called 'NextServiceDue' which is a calculated column =CEILING([Current SMU],10000)

So if the number is 8001 it will display 10000,

Id like to somehow set an If statment that says if 500 away from what ever the CEILING Number is up to change a choice column to yes or similar (So i can send a flow with an email and add a new list item elsewhere)

I currently have a solution to my problem but it is very long and requires alot of conditions in a flow for each number range,

the flow goes like this scheduled trigger with a get items and a condition of if value is greater than or equal to 9500 and less than or equal to 10000 and then another one for 19500 and 20000 etc etc all the way to rediculous numbers.

Is there a cleaner way with less code to do this?

Anyhelp would be appreciated.

2 REPLIES 2
Community Support Team

## Re: Can powerapps perform this function or is there a calculation that works for this problem

Hi @shaneOZ ,

In your calculated formula "=CEILING([Current SMU],10000)", is "Current SMU" a number column?

Sorry but since I'm not very fimilar with CEILING function, would you please help to explain, by "if 500 away from what ever the CEILING Number is up to change a choice column to yes or similar",  what is the range of "Current SMU" number?

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 8

## Re: Can powerapps perform this function or is there a calculation that works for this problem

@v-monli-msft wrote:

Hi @shaneOZ ,

In your calculated formula "=CEILING([Current SMU],10000)", is "Current SMU" a number column?

Sorry but since I'm not very fimilar with CEILING function, would you please help to explain, by "if 500 away from what ever the CEILING Number is up to change a choice column to yes or similar",  what is the range of "Current SMU" number?

Regards,

Mona

To Easy Mona,

SMU is just the actual engine hours of Heavy machinery kinda like Km/s (or Miles) on a car

The Ceiling function will round up a number column to the number you put in there in this case "=CEILING([Current SMU],10000)", its 10000 so 8000 in Current SMU would display 10000 but 10001 would display 20000

With the flow currently i have to build a condition for each possible number for the entire project ie. if the machine was 2nd hand and had 101000 Kms on the clock and i new it uses 50000 for every 1 year it runs and the project was 5 years i would have to build a condition in a flow for

greater than or equal to 109500

Less than or equal to 110000

&

greater than or equal to 119500

Less than or equal to 120000

&

greater than or equal to 129500

Less than or equal to 130000

Etc etc all the way up to that 350000 or whatever number i think it will go up to, you can see the problem with this, one its time consuming, 2 its messy and there has to be a better way, 3 what happens if the project continues further?

Announcements

Check it out!

#### Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

#### Power Platform World Tour

Find out where you can attend!

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

#### Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,514)