Could someone help me convert the below if statement into set analysis. I have been trying all day without success.
The below formula counts help desk ticket ID's that we created in the previous month. "Tickets Brought Forward From Previous Months" Would be the title of the chart. [Master MonthYear] is the charts dimension which belongs to a fully disconnected calendar table. It is slow but it's the only way I can get it to work, hoping set analysis will maybe help it run faster.
Count(DISTINCT(if([Created MonthYear] = Date(AddMonths([Master MonthYear],-1),'MMM-YYYY') And [User Department] = 'IT' AND ([Closed MonthYear] >= [Master MonthYear] or IsNull([Closed MonthYear])),[Ticket ID])))