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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
bgierwi2
Advocate I
Advocate I

Create Table with Escalating Values

I need to create a table where one column goes 1 to 1000

The other column starts at 500 for the first 2 entries, and then increases by 500 and stays for the next 3 entries, and that continues for the rest of the table.

 

 

OccurrencePenalty
1500
2500
31000
41000
51000
61500
71500
81500
92000
102000
112000
122500
132500
142500

 

and continuing to add 500 for the next 3 until the table ends

 

 

1 ACCEPTED SOLUTION
AshokKunwar
Continued Contributor
Continued Contributor

Hii @bgierwi2 

You need a sequence where the "Penalty" increment happens at irregular intervals:

  • Step 1: Occurrences 1–2 (2 items) = 500
  • Step 2: Occurrences 3–5 (3 items) = 1000
  • Step 3: Occurrences 6–8 (3 items) = 1500
  • And so on...

To Fix It

Go to the Modeling tab, click New Table, and paste the following code:

PenaltyTable = 
VAR BaseTable = GENERATESERIES(1, 1000, 1) -- Creates Occurrence 1 to 1000
RETURN
SELECTCOLUMNS(
    BaseTable,
    "Occurrence", [Value],
    "Penalty", 
        VAR _ID = [Value]
        RETURN
        IF(
            _ID <= 2, 
            500, 
            -- This logic handles the "every 3 entries" shift after the first 2
            500 + (INT(DIVIDE(_ID - 3, 3)) + 1) * 500
        )
)

 

Summary for the Community

​By using INT(DIVIDE([Value] - Offset, Step)), you can create custom "stepped" sequences that don't follow a standard 1:1 increment.

 

If this DAX table correctly generates your penalty schedule, please mark this as the "Accepted Solution"!

View solution in original post

3 REPLIES 3
bgierwi2
Advocate I
Advocate I

@AshokKunwar 

 

That worked perfectly for DAX.

Thank you

 

How similiar would the code be if I wanted to do it in Power Query?

AshokKunwar
Continued Contributor
Continued Contributor

@bgierwi2

 Your welcome,

If you have any more questions then you free to ask 

AshokKunwar
Continued Contributor
Continued Contributor

Hii @bgierwi2 

You need a sequence where the "Penalty" increment happens at irregular intervals:

  • Step 1: Occurrences 1–2 (2 items) = 500
  • Step 2: Occurrences 3–5 (3 items) = 1000
  • Step 3: Occurrences 6–8 (3 items) = 1500
  • And so on...

To Fix It

Go to the Modeling tab, click New Table, and paste the following code:

PenaltyTable = 
VAR BaseTable = GENERATESERIES(1, 1000, 1) -- Creates Occurrence 1 to 1000
RETURN
SELECTCOLUMNS(
    BaseTable,
    "Occurrence", [Value],
    "Penalty", 
        VAR _ID = [Value]
        RETURN
        IF(
            _ID <= 2, 
            500, 
            -- This logic handles the "every 3 entries" shift after the first 2
            500 + (INT(DIVIDE(_ID - 3, 3)) + 1) * 500
        )
)

 

Summary for the Community

​By using INT(DIVIDE([Value] - Offset, Step)), you can create custom "stepped" sequences that don't follow a standard 1:1 increment.

 

If this DAX table correctly generates your penalty schedule, please mark this as the "Accepted Solution"!

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.