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
latrous98
Frequent Visitor

measure to filter a matrix visual by rows targetting a specific category\row

I have a matrix of detailed data and I gather this information from among different tables in my model.
Knowing that I already created a summerise table for an intermediate level and I filter on it with another attribut(which is the second level subcategory in the matrix visual )
I want get to calculate a meausure that allow me to keep only the filtered elements that I get from the second table .
Knowing that I use a measure in that visual in order to get the data I want to keep
here is the code I use , and I only keep the row that give 1 value

Filtering =
Var maxVal = MAX('last_usage values'[Value])
Var maxVal2 = MAX('number_hours_usage values'[Value])
Var currentValue = MAX('Summary Table'[last_usage])
Var currentValue2 = MAX('Summary Table'[number_hours_usage])
RETURN
If( currentValue <= maxVal && currentValue2 <= maxVal2,
1,0)
so I want to write a similar measure to filter upon a matrix visaual
thanks in advance 
2 REPLIES 2
amitchandak
Super User
Super User

@latrous98 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

data.PNG

table.PNG

the matrix visual get the order laptop_code - A -B and as a subtotal for both A and laptop_code it get the min of C values 
Knowing that I select A in another table that it does also the min of C values and it uses another groupe and do it regardless of the values 
I can send an exemple of the summary table if needed

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.

Top Solution Authors