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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JVIR
Frequent Visitor

Filter in Matrix

Hi,

I'd like to have a slicer that can select all the lines when the value of the blue lines is not 0

if anyone can help

JVIR_0-1618343235555.png

 

thanks

 

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @JVIR 

According to your sample matrix visual, I’ve also created some test data to create a similar matrix as yours and use a measure to achieve your requirement, you can take a look at my steps:

This is the original matrix I created:

v-robertq-msft_0-1618542185455.png

 

  1. I clicked “Enter data” to create a table for the slicer:

v-robertq-msft_1-1618542185460.png

 

  1. I created a measure like this:
MtDiff1 =

var _sum=CALCULATE([MtDiff],FILTER(ALL('Table'),[ID]=MAX([ID])))

return

IF(

    SELECTEDVALUE(Slicer[Do you want to display the data which the blue lines is 0])="No",

    IF(_sum=0,BLANK(),[MtDiff]),

[MtDiff])
  1. Then I go to the matrix to replace the new measure with the original measure [MtDiff] and create a slicer like this:

v-robertq-msft_2-1618542185468.png

 

And I can achieve what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data or your sample test pbix file(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-robertq-msft
Community Support
Community Support

Hi, @JVIR 

According to your sample matrix visual, I’ve also created some test data to create a similar matrix as yours and use a measure to achieve your requirement, you can take a look at my steps:

This is the original matrix I created:

v-robertq-msft_0-1618542185455.png

 

  1. I clicked “Enter data” to create a table for the slicer:

v-robertq-msft_1-1618542185460.png

 

  1. I created a measure like this:
MtDiff1 =

var _sum=CALCULATE([MtDiff],FILTER(ALL('Table'),[ID]=MAX([ID])))

return

IF(

    SELECTEDVALUE(Slicer[Do you want to display the data which the blue lines is 0])="No",

    IF(_sum=0,BLANK(),[MtDiff]),

[MtDiff])
  1. Then I go to the matrix to replace the new measure with the original measure [MtDiff] and create a slicer like this:

v-robertq-msft_2-1618542185468.png

 

And I can achieve what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data or your sample test pbix file(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thanks for your help. It works perfectly 😊

vanessafvg
Super User
Super User

okay when you say select all the lines do you mean only show the lines where the  value > 0?

 

whata is the measure name being used where it is 0?  you have 2 columns showing there.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Yes all the lines <> 0

measure name is MtDiff

vanessafvg
Super User
Super User

thats so small can barely read it.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




sorry

I changed the size

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.