I want to do the Top 10 Change % (taking previous ...
# gd-beginners
d
I want to do the Top 10 Change % (taking previous period and this period and dividing it) over a specific volume (aka i don't want the examples where the volume moves from 1 to 3. - not useful ) Is there a way to do this - I'm being blocked
i
Hi Doug, Have you maybe tried to build your TOP metric manually via MAQL, please? It would give you a bigger freedom of customization. Please check the articles below: TOP or BOTTOM(n) IN TOP or BOTTOM(n) OF WITHIN Clause
d
Unfortunately no, but it was a good idea. I had to use the UI with "previous period" so that I could get the change % because the PERIOD() and PREVIOUSPERIOD() MAQL functions do not seem to work well outside of tables. (aka they seem not interact with the users choice of filter but the underlying data) but the UI function does work well! So I can add in a MAQL function on the result of UI calc.
j
You can follow steps: 1. Set comparison in date filter drop down which creates derived metric for Previous period 2. Use + icon in Metric bucket to create Change calculation (M2-M1)/M1 3. Add ranking filter (Top/bottom values) to filter bar using “filter icon” in the filter bar (note: an attribute must be used in “Rows”/“View by” to see this option) 4. Configure ranking filter to use the change metric
d
Yes, I was already doing steps 1 to 4. Except I did change from Ratio to Change. However, it doesn't solve my problem as i still have Negative Changes. I want top 10 that are positive if they are not positive than just top positive. for example Ideally, in my favourite world. I'd also only want the change % but I don't think that is possible based on another conversation I had
Hello
i
Hey @Jakub Sterba, any hints on this, please?
j
I suggest to use also metric value filter for the change metric (greater than 0)
d
@Jakub Sterba it won't let me use it. AKA the message above
i
How exactly did you try to apply the filtering, please? On what level?
d
sorry I don't understand the question. if you use the top 10 filter it won't let you use any other filter it seems but I want to
as I mentioned the first comment I want the change percentage to above 0% only and top 10 that's all
i
Yes, the built-in UI functionality is not available. I believe that what Jakub meant is to build it manually via MAQL and only then apply the TOP (n) filter. Could you kindly send me a link to your testing Insight, please? You can use a direct message.
m
Hi Doug, we are just wondering if you made any progress with this as Jakub mentioned, and to build it manually via MAQL and only then apply the TOP (n) filter?
d
No, its not possible to do in MAQL, because the Changes % is done in the UI and thats possible (as far as I know) to do in MAQL as the previous PERIOD function doesn't work in this use case. At least no one was able to figure it out when I chatted about it last.
j
You are right. It seems that such calculation which would dynamically respond to selected period in date filter is not feasible. The problem why combination of metric value filter together with top filter is disabled is because result depends on order of application of filters. What is desired behaviour in your use case? To apply first the metric value filter to display only positive changes and select top N values from the list reduced by the metric value filter?
d
I get how order would mater but in this use case it wouldn't matter. The top 10 is the top 10. And if there is less than 10 with change % greater than 0 then it would show the top 6 or whatever. If we filter A, B or B, A it should be the same result. The end result should be the TOP 10 with change % greater than 0 even if that means the resul tis less than 10
j
The order is probably more important if metric value filter uses different metric than for the top filter or if you look for example for top 3 of negative values vs. which of the top 3 values are negative. I assume the application of the top filter as the last is probably more likely expected behaviour by the users but it would be good to get confirmation before we implement it that way.
d
hmm. I can't see the difference that your trying to explain. Even if it uses a different column filters Its A ∧ B is equivalent to B ∧ A We have two filters TOP 10 (lets say top 2 to make it simplier for now) Above 0 Example 1
Copy code
1. 55%
2. 44%
3. 1%
4. -14%
5. -55%
Example 2
Copy code
1. 55%
2. -1%
3. -11%
4. -14%
5. -55%
filter by to 2 THEN filter by above 0
Copy code
Filter by top 2

EX1
1. 55%
2. 44%

Ex2

1. 55%
2. -1%

FILTER by above 0 

Ex1
1. 55%
2. 44%

Ex2
1.55%
Example 2 - Filter by above 0 THEN by top 2
Copy code
Filter by above 0 

EX1
1. 55%
2. 44%
3. 1%

Ex2

1. 55%

FILTER out 0 

Ex1
1. 55%
2. 44%

Ex2
1.55%
If you make me decide one or the other. Suppose Calculate, Filter than Top 10? But I don't see the difference.
p
🎉 New note created.