Forum Discussion

rsbin's avatar
rsbin
Community Champion
3 years ago

CurrentYear - Last Year

Good Afternoon,

It's been a while since I have had to do any DAX.  For some reason, I am getting myself all twisted up with this one.

I have a Measure to calculate [Selling Profit] YTD:

SellingProft_YTD = CALCULATE( [Selling Profit],
                   ALL(DimTime),
                   DATESYTD( DimTime[Date], "12/31" ))          

Unfortunately, I have inherited this model from another developer.
First issue is the company maintains future dated invoices in their Fact Table.  But I only want the Calculation up to and including Today().   When I tried adding this additional filter, I lost my Cumulative Values.  Unsure of the syntax to accomplish this.

 

Second issue is I need to calculate the Difference in [Selling Profit].   So [Selling Profit] Current Year - [Selling Profit] Last Year.

Got myself all twisted trying to do this.  A helping hand would be much appreciated.

 

Thanks and Regards,

 

6 Replies