Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have month-year column(jan-2023) in a table.we need to create a two columns one is column1 and column2.
| Month_Year |
| Jul-22 |
| Aug-22 |
| Sep-22 |
| Oct-22 |
| Nov-22 |
| Dec-22 |
| Jan-23 |
| Feb-23 |
| Mar-23 |
| Apr-23 |
| May-23 |
| Jun-23 |
| Jul-23 |
| Aug-23 |
| Sep-23 |
| Oct-23 |
| Nov-23 |
| Dec-23 |
| Jan-24 |
| Feb-24 |
| Mar-24 |
| Apr-24 |
| May-24 |
| Jun-24 |
| Jul-24 |
| Aug-24 |
| Sep-24 |
| Oct-24 |
| Nov-24 |
| Dec-24 |
| Jan-25 |
| Feb-25 |
| Mar-25 |
| Apr-25 |
| May-25 |
Column1 one we need to generate the seires as shown below: Current month starts with series from 0 and so on….,if the current month is may should show it as 0 next month as 1………….
Expected1:
Column2:
We need to create a second column (Column2) as bucketing based on column1 we neeed to do bucketing 0-1,2-5,6-11,12-23,24+
Expected output:
Thanks,
SBC
Solved! Go to Solution.
Firstly, make sure that your year month column is actually a date, you can control the visual output by using the format string. You can then add the first column like
Column 1 =
DATEDIFF ( TODAY (), 'Table'[Year month], MONTH )
and you can use the static segmentation pattern to calculate column 2.
Firstly, make sure that your year month column is actually a date, you can control the visual output by using the format string. You can then add the first column like
Column 1 =
DATEDIFF ( TODAY (), 'Table'[Year month], MONTH )
and you can use the static segmentation pattern to calculate column 2.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 29 | |
| 21 | |
| 12 | |
| 12 |