Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pan_Forex
Helper III
Helper III

linear progression

Hello guys, do you have any idea how to easily add a fixed increment? The only thing I can think of is the if function, but I have several thousand rows and would prefer to streamline it 🙂 Simple data:

xy
12551
25450,99
35550,98
47870,97
62220,95
65650,95
88550,93
90010,91
96550,91

I would like the function, after x increases by 1000, to subtract 0.01 from y. This can be as a new column or function, of your choice.

 

1 ACCEPTED SOLUTION

hi @Pan_Forex 

then try this:

y = 1- TRUNC( [x]/1000)*0.01
FreemanZ_0-1673182909589.png

 

please consider @ someone, if you seek further suggestions.

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @Pan_Forex 

from 4787 to 6222, from 8855 to 9001, why subtract 0.01 twice? 

Because the range is between 0-1000, 1001-2000, in the second example there is an error. let's make it simple. For numbers < 1000-1, between 1001-2000=0,99, between 2001-3000=0,98 and so on

hi @Pan_Forex 

then try this:

y = 1- TRUNC( [x]/1000)*0.01
FreemanZ_0-1673182909589.png

 

please consider @ someone, if you seek further suggestions.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.