Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
_ajinkyaj
Frequent Visitor

Need Help - How to Filter Rows in a Matrix Visual While Retaining Sparklines in Power BI?

I have a matrix visual in Power BI with Product Category and Subcategory in the rows. The values include Profit Margin and sparklines that display the Margin at the monthly level.

I want to allow users to filter records based on a specified %margin, showing only rows where the %margin exceeds the provided value. While this filtering works as expected without sparklines, I am encountering issues when sparklines are included. Specifically, I want to retain the sparklines in the visual while filtering out rows where the %margin is less than or equal to the specified value.

How can I achieve this functionality in Power BI? Any guidance would be appreciated!

2 REPLIES 2
Kedar_Pande
Super User
Super User

@_ajinkyaj 

Create a Measure:

Filtered Margin = 
IF(
[Profit Margin] > SelectedValue('FilterTable'[Margin Threshold]),
[Profit Margin],
BLANK()
)

Use the Filtered Margin measure in the "Values" field of the matrix.

Ensure sparklines are still based on the unfiltered data (original %Margin measure) so they don't disappear.

 

💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

TomMartens
Super User
Super User

Hey @_ajinkyaj ,

 

pleae create a pbix file that contains sample but still reflects your semantic model (tables, relationships, calculated columns, and meausres), upload the file to OneDrive, Google Drive, or Dropbox and share the link.

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.