Reputation: 1
I have a lead lifecycle where I have to count the number of marketing qualified leads that have the MQL state in a selected duration BUT they shouldn't be in the MQL stage any time before that time (i.e before the start time of the selected date).
For example in the screenshot that I have attached I can see that the number of MQLs between 1st Nov 2022 & 30th September. I don't want to see the leads in this count that have the MQL status before 1st Nov 2022.
Upvotes: 0
Views: 80
Reputation: 11921
In the general case, the expression INT() returns 1 or 0 for each record to indicate whether the is satisfied for that row -- i.e. INT() converts TRUE to 1 and FALSE to 0.
So you can either
The second approach is useful when you want to retain records in your analysis that don't satisfy your boolean condition - e.g., if those other records are needed for other calculations.
As an example, if you define a calculate field called Num_Leads_In_Interval as INT([Qualified Lead] AND [Date] >= [Interval_Start_Date] and [Date] <= [Interval_End_Date])
Then simply use SUM([Num_Leads_In_Interval]) in your view and change the parameters controlling the Interval start and end date as desired.
Again, the simplest approach is to define your filters on the filter shelf instead of in your calculations, but the filter shelf applies to the entire view, so if you want to be more selective about it for individual measures, you can essentially move your filtering criteria from the (more global) filter shelf into the (more specific) calculated field(s).
Upvotes: 0