Forum Discussion
Last period Data based on Date/Quarter/Month/Week Filter selection
- 8 years ago
Its all about filter context, Try creating a lookupdate table with Just YEARMONTHSHORT values
YEARMONTHS = VALUES(date[YearMonthShort])
Relate that to your data table and set your slice on that.
If doesn't work, you could try NOT using a SLICER to select the month but instead use a disconnected slicer to have user select month, date or whatever and then use that SELECTEDVALUE of what the user selectes as teh desired period in your measures.
Hi Seward12533,
It is working now. I changed my formula as below:
OIF_Value_EUR_Calc = VAR LstDate = (max(Filter_Table[Date])) Return
CALCULATE (
SUM ( V_OPPORTUNITIES_OIF[OIF_Value_EUR] ),
DateDIM[Date]<=LstDate&&DateDIM[Date]>=LstDate-365)
Thanks a lot for all your help! :)
Regards,
Poonam
If its a good date table then there should not be blanks :) But I'm glad it worked! BTW if you ever wanted to try the option I suggested for creating the bidge table dynamically with DAX
NTHS = CALCULATE(VALUES(date[YearMonthShort]),NOT(ISBLANK(date(YearMonthyShort)))