I am working on a specialized executive dashboard where we want to represent hierarchical data levels (Top Management to Ground Staff) using a pyramid-shaped slicer. Does Power BI support non-rectangular button layouts for the new button slicer visual? I want the buttons to taper as they go up. If it's not natively supported, is there a workaround using SVG graphics or third-party visuals to achieve this triangular aesthetic while keeping the filtering functionality?
3 answers
Power BI's native "New Button Slicer" doesn't have a "pyramid" setting, but you can definitely fake it using the layout properties. The trick is to set the slicer to a single column and then use the "Grid" settings to manipulate the padding. However, for a true geometric pyramid look, the best approach is to use SVG images as the background for each button state. You can write a DAX measure that generates a triangular SVG shape. By varying the width of the triangle based on the index or rank of the category, you create a visual taper. You then set the Image Fit to "Fill" or "Fit" within the button settings. This maintains the native slicer's speed while giving you that custom, top-heavy or bottom-heavy triangular UI you’re looking for.
That SVG workaround sounds clever, but how do you handle the text alignment? If the button is a triangle, won't the text often overlap the "empty" corners of the rectangular bounding box, making it look a bit messy or unaligned
If you don't want to mess with code, try the "Chiclet Slicer" from AppSource. It allows for more flexible button shaping and background images than the standard slicer.
I’ve used the Chiclet Slicer for this too, Kimberly! One extra tip: if you go the SVG route, you can make the pyramid interactive by changing the fill color in your DAX based on the ISFILTERED function. This makes the selected level of the pyramid glow or change color, which looks amazing for executive presentations.
You’re right, Brandon, text alignment is the hardest part. What I do is set the "Label" position to "Inside Center" and use heavy horizontal padding on the top buttons to force the text into the narrow part of the pyramid. Alternatively, you can bake the text directly into the SVG code using a tag. This way, the text is technically part of the image and stays perfectly centered within your custom shape, regardless of how Power BI tries to pad the button container. It takes a bit more DAX to string the text into the SVG code, but the result is pixel-perfect.