Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SEMattis
Advocate III
Advocate III

[DAX] Format function returning wrong month and date?

Hi,

 

So I have a problem with the formatting function which could be error 45 (I.e. yours truly) or something really interesting is happening in Power BI. When using the following syntax:


VAR Prev_M = MONTH((TODAY())) -
 
It returns 1. However when setting the variable in the FORMAT function and converting the date to a month name the measure returns "December" (See images below).
SEMattis_0-1707916853333.pngSEMattis_1-1707916890633.png

Need some help 😄

13 REPLIES 13
Anonymous
Not applicable

Hi @SEMattis 

How about  FORMAT(TODAY(),"MMM") ? Perhaps MOTH function is messing up something .
Thanks !

Well this would not work since I am dependent on months in the past to solve my problem. Good idea though.

Anonymous
Not applicable

I'am having the same problem. It is terrible.

 

Open a new ticket with your problem and I will take a look





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Tell me what you want to show on the visual and I will give you the correct dax function.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




So I want the FORMAT function to return "December" rather than January

SEMattis
Advocate III
Advocate III

And perhaps even more worrying? 

SEMattis_1-1707921693337.png

 

 

_AAndrade
Super User
Super User

The problem is in you dax formula. You put 

_AAndrade_0-1707920788961.png

And you must put -1 inside parantesis. like this:

_AAndrade_1-1707920832449.png

 



 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




@_AAndrade. Unfortunately, it is still not working

 

SEMattis_0-1707921227198.png

 

Please try this formula:

_AAndrade_0-1707923273388.png


I think it's what you're looking for.

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




@SEMattis please let me know if your problem was solved.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Sorry but I have tried this too without success

Please send me a picture with the output that you're looking for, because I don't understand yet what are the problem





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.