Error in Expression:'}' expected for showing past 12 month dates
I need to create a bar chart that counts the number of distinct facilities in the trailing 12 month of the selected As_Of_Date. For example, if 03/31/2025 is selected, I need to show a bar chart showing each month facility could from 04/30/2024 to 03/31/2025.
My data is only on month ends (business days), which means I only have one As_Of_Date in each month.
The dimension is As_Of_Date. This script provided by gpt on the measure is giving me erorr 'Error in Expression:'}' expected':