Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
dawnsurguy
Contributor
Contributor

Dimension Limits (Middle)

Hi Community,

This is my first post so I hope it gets posted correctly.

I have built a bar chart to show impact on my results by Topic. 

I know how to limit the Top or Bottom by a number but how do I suppress the middle portion and keep the top and bottom. Ideally I could suppress everything between .2 and -.2 - the blue section indicated in the image. I've also tried using "If" but I could be doing it incorrectly since it requires a fairly lengthy formula to get to the .2/-.2 result. Loading it in script isn't an option.

Thanks in advance!DimensionsDimensions 

3 Replies
marcus_sommer

You may try something like this:

sum(value) * rangemax(-(rank(sum(value))<=5), -(rank(-sum(value))<=5))

which used rank() twice within a condition to get a multiplicator of 0 or 1. By hiding zero-results within the object you get only the top + bottom results.

- Marcus

dawnsurguy
Contributor
Contributor
Author

Hi 

Thank you for the response.

Please excuse my lack of knowledge but a couple of follow up questions...

Is this formula used in the Dimension or in the Measure? Assuming "Value" would be replaced with the formula used to calculate the measure?

Thanks again!

Dawn

marcus_sommer

Such approaches could be used within dimensions and measures whereby in dimensions it would require to wrap the aggregation with a aggr() function. Therefore it's usually more suitable to apply it within the measure.

And yes, sum(value) needs to be replaced with your expression.

- Marcus