Forum Discussion
Date format issue
- 1 year ago
Hi fksng66 , Thank you for reaching out to the Microsoft Community Forum.
Unfortunately, what you're trying to do isn't possible with DAX or measures alone while the date column has inconsistent formats like mm/dd/yyyy and dd/mm/yyyy. Power BI cannot reliably detect the correct last date of the month if it's misinterpreting some dates (like 05/12/2025 being seen as December 5 instead of May 12).
The only way to make your original formula work is to ensure the column is a proper Date type with a consistent format during the data load stage ideally in Power Query using the Change Type Using Locale option. Otherwise, any logic based on date comparisons will return incorrect results.
I know it's not the answer you'd hoped for but just wanted to clarify that this limitation isn't something DAX or visuals can fix it has to be resolved at the source or Power Query level.
Custom Date Formats in Power BI Using a Slicer - Microsoft Fabric Community
but isn't that the original one that i used? and i can't get 134,351 for all of 31st may's dates using that fomula for some reason.
fksng66 the original DAX is works on recent/latest date, in your data 12/5/2025 is the recent/Latest date. That is the reason you can see directly May-25. If you want to see selected month data use provided measure.
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
- fksng661 year agoHelper II
How did you see 12th may is the latest date tho? cause it clearly shows there's 31st may on my side