Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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':
Count({
<As_Of_Date = {">=$(=Date(AddMonths(Max(As_Of_Date), -11), 'MM/DD/YYYY'))", "<=$(=Date(Max(As_Of_Date), 'MM/DD/YYYY'))"}>
>} distinct facility_id)
What should I do to get the right measure?
Count({
<As_Of_Date = {">=$(=Date(AddMonths(Max(As_Of_Date), -11), 'MM/DD/YYYY')) <=$(=Date(Max(As_Of_Date), 'MM/DD/YYYY'))"}>
>} distinct facility_id)
syntax is as follows:
{<Field={" >= value <= value2"}>} and not {<Field{">=value","<=value2">}