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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.