Forum Discussion
Format function changing the current month to previous month
Hey guys,
I am using today function to get the current month, i.e. Month(Today()) which gives me output 2 as for February, but when I use format() to get the full name it changes to January - any idea what could be reason behind?
Here's the code:
Hi Yolo_pbi
This happens because the current month is not a date datatype, it is just a number. so you always will have it as a January.
Modify your formula toCurrent_Month =FORMAT(today(),"mmm")pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
2 Replies
- PijushRoyCommunity Champion
Hi Yolo_pbi
Please create a measureCurrent Month = FORMAT(TODAY(),"MMMM")
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin - Ritaf1983Super User
Hi Yolo_pbi
This happens because the current month is not a date datatype, it is just a number. so you always will have it as a January.
Modify your formula toCurrent_Month =FORMAT(today(),"mmm")pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly