I have this table below. How to get Revenue_MTD in DAX? Revenue_MTD equals to the revenue of the last month of each year. The tables are from Tableau and I am converting these to power bi.
with only years:
If you want to get the revenue of the same month previous year you can add a calculated column with this type of dax expression :
Revenue_MTD = SUM(Revenue),
PARALLELPERIOD(
[Date],
-12,
MONTH)
)
you can have more detail on this link : https://radacad.com/dateadd-vs-parallelperiod-vs-sameperiodlastyear-dax-time-intelligence-question
This is a standard powerbi measure, it should be fairly easy for you to implement this.
MEASURE = CLOSINGBALANCEYEAR(,[,][,]) . . . MEASURE = CLOSINGBALANCEYEAR(SUM(Revenue), DATE )
As long as you have a Date column with appropriate Date Column it should work.
then create another measure with only SUM(revenue)