Trying to create a comparison across two compared ...
# gd-beginners
Trying to create a comparison across two compared time periods. Fields: Date (set to a dynamic time period; this week compare to previous period). A MAQL measure identifying if they had done a condition (aggregated on how many calls they used our tool with and was over a certain percentage threshold). I want to show the agents from the previous period who were in our top bucket, and what bucket they moved to if they moved. (I.e. from High -> Mid/low/no usage). I've tried setting up two numeric metrics, and putting a filter on both columns and getting no results when there's clearly a piece. I've tried having WITHOUT PF and it's not working either
Hi Ryan, can you please share with me how you have defined your metrics?
I can see that you also have filter set there “Was High” = 1. Can you please confirm for me what you would expect to see there, versus what you’re currently seeing? For example, would you expect to see hits/people in the “Low” & “Medium” columns?
The result is correct. Our metric is:
Copy code
SELECT count({label/user_id})
SELECT AVG({metric/analyzed_interactions_per})
BY {label/user_id}
) > 0.85
As we're aggregating our data table's atomic level (call level) to produce a metric on a time period.
So this returns a 1 for any agent who has that performance result.
My apologies for the delay in getting back to you - but would please be so kind as to provide more details on what seems to be the problem in your report. Based on the screenshot, I am not sure what is the expected results there?
The problem is when I add a second filter to the table, of User Analyzed - High Check (which is what Was High is comparing against) = 0, it's saying "no data in your filter"
Hi Ryan, thanks for the additional info. It seems in this case it seems that the 2 ranking metric filters you have in place there are conflicting with each other. You have one which is looking for “=1” while the other is looking for <>1 (Does not equal). So it seems your filters and metrics are conflicting there. As the only values from your initial screenshot are the values “1"
Perhaps working with the IFNULL statement will help with how you work with these empty values - IFNULL statement allows you to control replacement of missing values that are returned by an expression. If a metric expression that is wrapped within an IFNULL statement ever returns a null value, the replacement number specified in the second parameter of the IFNULL function is inserted in place of the null value. More details can be found here:
Perhaps you might also find our free GoodData University courses for MAQL useful:
But this doesn't give the functional ability to use the compare to previous period without calculating the previous period in the MAQL itself. I'm trying to use the functionality of a previous period comparison, and compare those two values on a binary scale; was it set in the previous period and not set in the current period.
Hi Ryan, I am very sorry, but I missed your last update here - Can you please let me know if you’re still having troubles with this?
I think I figured this out, yeah.