1
votes

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.

enter image description here

with only years:

enter image description here

3

3 Answers

0
votes

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

0
votes

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)

-1
votes

What expression are you using for your [Revenue_MTD]? Are you using the built-in DAX function TOTALMTD?