Software Development

Is it possible to design a pyramid-shaped button slicer layout for visual filtering in Power BI?

KI Asked by Kimberly Adams · 08-09-2024
0 upvotes 5,635 views 0 comments
The question

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

0
MI
Answered on 10-09-2024

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.

0
BR
Answered on 14-09-2024

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

ER 18-09-2024

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.

0
SA
Answered on 20-09-2024

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.

MI 22-09-2024

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.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session