Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago

Creating the Last 5 YTDs

Dear Community, good morning.

You would need to create a field that contains the last 5 YTDs (but not in multiple calculations), but in a single one to be able to use it as an x-axis in a Chart.

Since I have a calendar table, I was thinking of using an IF + Datesbetween function (

IF(DATESBETWEEN(Calendar[Date],DATE(2021,09,01),DATE(2022,10,31)),"Complies","Not Compliant"))

, indicating that if the date was within a certain period, I would put the "YTD xxxx" field, but it doesn't work.

Could you help me or comment on your experience in similar situations?

Thank you!

1 Reply