Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
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.
| Occurrence | Penalty |
| 1 | 500 |
| 2 | 500 |
| 3 | 1000 |
| 4 | 1000 |
| 5 | 1000 |
| 6 | 1500 |
| 7 | 1500 |
| 8 | 1500 |
| 9 | 2000 |
| 10 | 2000 |
| 11 | 2000 |
| 12 | 2500 |
| 13 | 2500 |
| 14 | 2500 |
and continuing to add 500 for the next 3 until the table ends
Solved! Go to Solution.
Hii @bgierwi2
You need a sequence where the "Penalty" increment happens at irregular intervals:
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
)
)
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"!
That worked perfectly for DAX.
Thank you
How similiar would the code be if I wanted to do it in Power Query?
Hii @bgierwi2
You need a sequence where the "Penalty" increment happens at irregular intervals:
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
)
)
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"!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 43 | |
| 38 | |
| 35 | |
| 21 | |
| 15 |
| User | Count |
|---|---|
| 65 | |
| 58 | |
| 28 | |
| 27 | |
| 25 |