cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JulieB_
Helper I
Helper I

GENERATESERIES with incrementvalue 1. How to add calculated columns with incrementvalue 5 and 10

Hi, I created a table where first column is a GENERATESERIES. 

2022-01-07_11h49_38.png

Now I want to add columns likt this : 

Columns with different increment values based on the first generateseries column.

Value5series10series
1510
2510
3510
4510
5510
61010
71010
81010
91010
101010
111520
121520
131520
141520
151520
162020

 

Is here a measure for? 
Using an IF condition to create these calculated columns seems not a good solution...

 

Thanks!

Julie

2 ACCEPTED SOLUTIONS
bcdobbs
Super User
Super User

How about this:

Table TEST = 
ADDCOLUMNS (
    GENERATESERIES ( 1, 3000, 1 ),
    "Series 5", ( QUOTIENT( [Value] - 1, 5 ) + 1 ) * 5,
    "Series 10", ( QUOTIENT( [Value] - 1, 10 ) + 1 ) * 10
)


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

ValtteriN
Super User
Super User

Hi,

Here is one way to do this:
5 series: 

Column 2 = FLOOR('Table'[Value]+5,5)
10 series:
Column = ROUNDUP('Table'[Value],-1)
I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

Here is one way to do this:
5 series: 

Column 2 = FLOOR('Table'[Value]+5,5)
10 series:
Column = ROUNDUP('Table'[Value],-1)
I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




bcdobbs
Super User
Super User

How about this:

Table TEST = 
ADDCOLUMNS (
    GENERATESERIES ( 1, 3000, 1 ),
    "Series 5", ( QUOTIENT( [Value] - 1, 5 ) + 1 ) * 5,
    "Series 10", ( QUOTIENT( [Value] - 1, 10 ) + 1 ) * 10
)


Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!