Forum Discussion
Syndicate_Admin
2 years agoAdministrator
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
- ryan_mayuSuper User
maybe you can try
if([date] >=date(2021,9,1) && [date]<=date(2022,10,31),"cumple","no cumple")