Forum Discussion
Adjust/customize the billing date
Hi Power BI Community,
I have this data which involves date. The thing is, our reporting month should be within our billing date.
Our billing date is from 26th of the previous month upto 25th of the current month.
| Before | After |
| 12/26/2019 | 01/01/2020 |
| 12/27/2020 | 01/02/2020 |
| . . . | . . . |
| 01/26/2020 | 02/01/2020 |
| 01/27/2020 | 02/02/2020 |
| . . . | . . . |
| 12/25/2020 | 12/31/2020 |
Take the table above for example. I want it that way.
I found some solution but not exactly what i want.
can anyone help me out?
Thanks
2 Replies
- AnkitKukrejaSuper User
Hi Anonymous
Please refer to acticle shared by Greg_Deckler . He has explained how to get your queries resolved in a timely manner.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Thanks,
Ankit
- BA_PeteSuper User
Hi Anonymous ,
I'm not sure I've understood your requirement fully, but if you want to add a reporting date that is the first of the following month if the 'Before' date is before the 26th, but the first of the month-after-next if it is on or after the 26th, then add this as a new column in Power Query:
if Date.Day([Before]) >= 26 then Date.StartOfMonth(Date.AddMonths([Before], 2)) else Date.StartOfMonth(Date.AddMonths([Before], 1))This is the output I get:
It doesn't follow the 'After' column example, but that column didn't seem to follow any particular pattern that I could see in relaion to the 'Before' state.
Pete