Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Colleagues, hello!
I have a column with a period and a number of rows with data that equals the number of days in a month.
How can I put days from 1 to 28-31 in a separate column?
Solved! Go to Solution.
Hi @pani_victoria ,
To achieve this in Power BI, you can create a calculated column that assigns a day number (1 to 28/31) to each row within the month.
Create a Calculated Column: Use the following DAX formula to create a new column for days:
DayNumber =
RANKX(
FILTER(
TableName,
TableName[Period] = EARLIER(TableName[Period])
),
TableName[IndexColumn],
,
ASC
)
Result: This formula will rank rows within each month, creating day numbers 1 to 28/31 in a new column.
Please mark this as solution if it helps. Appreciate Kudos.
Hi @pani_victoria ,
To achieve this in Power BI, you can create a calculated column that assigns a day number (1 to 28/31) to each row within the month.
Create a Calculated Column: Use the following DAX formula to create a new column for days:
DayNumber =
RANKX(
FILTER(
TableName,
TableName[Period] = EARLIER(TableName[Period])
),
TableName[IndexColumn],
,
ASC
)
Result: This formula will rank rows within each month, creating day numbers 1 to 28/31 in a new column.
Please mark this as solution if it helps. Appreciate Kudos.
Thank you!
It works!)
but not for me
I didn't take into account some input data, because of which this solution doesn't work correctly
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 13 | |
| 11 | |
| 11 | |
| 8 | |
| 6 |