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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
psorel
Helper I
Helper I

Filter a matrix visual with values of measure

Hi, 
I created a matrix visual with differents groups in first column and count and sum measures after. 
I don't understand why i can't filter on measure >0 for delete rows with 0. 
I tried a "test_filter" measure if( [nb noubeaux mandats] >0,1,0) i got 0 everywhere. 
I don't have all or allexcept functions in measures.
Can u help me ?


Capture d’écran 2024-12-03 110638.png

6 REPLIES 6
psorel
Helper I
Helper I

In my case it's a measure for each column and different data type, can i filter all the row if just one value  " [nb noubeaux mandats" in my case , is > 0 .  I filter all my measure on the max(start month date) . Thanks

Laxmanjatoth
Resolver I
Resolver I

are you using any time intelligence functions or anythink else ?

danextian
Super User
Super User

Hi @psorel 

That is because the filter is applied to the total column and not to every cell in your matrix. In the screenshot below, Table2 is filtered to have a value  > 0 but it did not filter out the second row because the total for that row is 2 and not 0

danextian_0-1733223736198.png

If you want those  with 0 disappear, return them as blank in a measure

My Measure =
VAR _val = SUM ( 'Table'[Value] ) RETURN IF ( _val = 0, BLANK (), _val )

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

Hello,danextian and Laxmanjatoth ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@psorel .I am glad to help you.
Like this?

vjtianmsft_0-1733387383243.pngvjtianmsft_1-1733387408138.png

vjtianmsft_2-1733387441899.png

Note that I didn't put any fields in the Columns field, the Rows filed puts the [ID] column, and the Values field puts the measure of the data being displayed.

vjtianmsft_3-1733387513931.png

This is my test data:

vjtianmsft_4-1733387529509.png
the measure I create.

M_DateDiff = 
VAR _date =MAX('matrixTest'[Date])
VAR _maxTotal =CALCULATE(MAX('matrixTest'[Date]),ALL(matrixTest))
RETURN
DATEDIFF(_date,_maxTotal,DAY)

M_MaxGroupName = MAX('matrixTest'[GroupName])

M_SumSales = SUM('matrixTest'[DailySales])

test_filter = IF([M_SumSales] > 0 ,1,0)


If my understanding is off, please keep me informed and attach more information or provide the pbix test file (shared on the forum via a github link) that doesn't contain sensitive data This will help to resolve your issue.

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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

That will work with matrix without a field on the columns tile. Following that approach, OP might as well use a table instead of a matrix. But, what if  for example, ID 1 has both A and B? Since GroupName value is being returned using a measure using MAX, A now disappears.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

Hi,@danextian .
Thank you very much for the heads up.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.