Forum Discussion
CliffordAP
Helper II
5 years agoCalculate same day previous month DAX
Hello everyone! I think my inquiry should be an easy one. I want to find a way to compute a date based on the output of another date. Say I have the following date, DATE(2021,01,16) I ...
CliffordAP
Helper II
5 years agoNVM!
I figured it out. There is a simple way to do this.
You can use the MONTH function to calculate the previous month of the output date, and subtract the number of months.
DATE(2021,MONTH(DATE(2021,01,16))-1,16)
output
DATE(2020,12,16). 🙂
Anonymous
5 years agoNot applicable
No, this is a very bad way to handle time calculations. Please read this and do not make mistakes others so easily do: Time Intelligence in Power BI Desktop - SQLBI