Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Community,
I need to create a calculated column that subtracts one month from an Invoice date column.
The formula needs to be valid also for the change of the year.
[DATEADD works but only for a couple of rows..not sure why]
Can someone help me out here?
Thanks in advance
Solved! Go to Solution.
Hi @alevandenes
Try using EDATE function (DAX)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @alevandenes
Try using EDATE function (DAX)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
I don't quite understand, you can use the function: Month('ColumnName')
or, if you want year and month number, something like:
concatenate(year(ColumnName),
month(ColumnName)).
(and in the event that you always want a leading zero, an if >0 and another concatenate would be nice)
I don't know if it's what you were looking for. If you can give an example, better 😁
DATEADD is the correct function to use.
Please provide some sample data, pasted as data.
Please explain what happens for the rows it is not working for.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Take a month from a date column like this:
var Month_Name = Month(Datecolumn_name)
return Month_name-1
OR
You can also use Previous Month Function
This doesnt work as it is only taking the month number minuts one.
it doesnt account for change of the year
thanks anyways
Have you tried PREVIOUSEMONTH dax function?
apparently it doesnt work with a table, but only with a single value specified
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |