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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
wfrohwein
Frequent Visitor

Matrix Filter Question / Problem

I have a matrix that looks like this below.

 

wfrohwein_0-1665693427759.png

 

The source of this data is a table I made in dax:

 

Case Summary = {
("Total Open", "", "", "", [Cases Open - All Time], 0),
("Opened", [Cases Opened - Today], [Cases Opened - L7], [Cases Opened - L30], [Cases Opened - All Time], 1),
("Closed", [Cases Closed - Today], [Cases Closed - L7], [Cases Closed - L30], [Cases Closed - All Time], 2),
("% Closed of Open", [Cases ClosedOpen Percent - Today], [Cases ClosedOpen Percent - L7], [Cases ClosedOpen Percent - L30], [Cases ClosedOpen Percent - All Time], 3),
("Avg Time to close", [Cases AVG TTC - Today], [Cases AVG TTC - L7], [Cases AVG TTC - L30], [Cases AVG TTC - All Time], 4)
}

 

All of the columns except the first and last are coming from measures I have created. This gets me the results I am looking for just fine.

 

The problem is, if i apply a filter to the matrix, page or all pages, it does not filter down the results at all. I believe it has to do with the measures and how i constructed them or goign through matrix -> dax table -> measures.

 

Here are the measures I am using:

 

Case Count = COUNTROWS('Case')
Cases Open - All Time = CALCULATE([Case Count], 'Case'[IsClosed] = FALSE)
Cases Opened - Today = COALESCE(CALCULATE([Case Count], 'Case'[Created Today] = TRUE),0)
Cases Opened - L7 = CALCULATE([Case Count], 'Case'[Created L7] = TRUE)
Cases Opened - L30 = CALCULATE([Case Count], 'Case'[Created L30] = TRUE)
Cases Opened - All Time = [Case Count]
Cases Closed - Today = COALESCE(CALCULATE([Case Count], 'Case'[Closed Today] = TRUE), 0)
Cases Closed - L7 = COALESCE(CALCULATE([Case Count], 'Case'[Closed L7] = TRUE),0)
Cases Closed - L30 = COALESCE(CALCULATE([Case Count], 'Case'[Closed L30] = TRUE),0)
Cases Closed - All Time = COALESCE(CALCULATE([Case Count], 'Case'[ClosedDate] <> BLANK()),0)
Cases ClosedOpen Percent - Today = FORMAT(DIVIDE([Cases Closed - Today],[Cases Opened - Today]), "#0%")
Cases ClosedOpen Percent - L7 = FORMAT(DIVIDE([Cases Closed - L7],[Cases Opened - L7]), "#0%")
Cases ClosedOpen Percent - L30 = FORMAT(DIVIDE([Cases Closed - L30],[Cases Opened - L30]), "#0%")
Cases ClosedOpen Percent - All Time = FORMAT(DIVIDE([Cases Closed - All Time],[Cases Opened - All Time]), "#0%")
Cases AVG TTC - Today = COALESCE(CALCULATE([AVG Time to Close], 'Case'[Closed Today] = TRUE && 'Case'[IsClosed] = TRUE),"X")
Cases AVG TTC - L7 = CALCULATE([AVG Time to Close], 'Case'[Closed L7] = TRUE && 'Case'[IsClosed] = TRUE)
Cases AVG TTC - L30 = CALCULATE([AVG Time to Close], 'Case'[Closed L30] = TRUE && 'Case'[IsClosed] = TRUE)
Cases AVG TTC - All Time = CALCULATE([AVG Time to Close], 'Case'[IsClosed] = TRUE)

 

All the ones that look like Created Today, Created L7, Created L30, Closed Today etc... are calculated columns i created that return a boolean. AVG Time to Close was a bit trickier as they wanted to see it in a certain format. Here is how that was done:

 

AVG Time to Close =
VAR Elapsed_Time =
AVERAGE([Time to close])
VAR days = INT(Elapsed_Time)
VAR _hrs = (Elapsed_Time - days) * 24
VAR hrs = INT(_hrs)
VAR mins = ROUND((_hrs - hrs) * 60, 0)
RETURN
IF(days > 0, days & "d " & hrs & "h " & mins & "m ",  IF(hrs > 0, hrs & "h " & mins & "m ", IF(mins > 0, mins & "m ", "")))

 

As for context around the data. This is related to support cases. So naturally they want to see how many cases we opened, closed today, last 7 days, last 30 days and all time. As well they wanted to see % of closed vs open and average time to close, which basically means they want to see the average of how long its taking their people to close these cases out.

 

I could not think of another way of structuring the data to get me the results in this format. My previous go at it, just used Cards for every single measure. This did work, and did allow filtering, but was just a pain in the arse to layout on the screen and manage when they wanted to add a new column or row.

3 REPLIES 3
vanessafvg
Super User
Super User

if you give me some sample data in text form, i should be able to figure this out. but i will need some data to do this.    Ideally if you could provide the pbix that would be ideal.





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!




vanessafvg
Super User
Super User

 can you give an example of what was wrong, vs what you were expecting?





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 absolutely. So all of the cases are split up by a field called RecordType. I would like 1 page for record type A and one page for record type B. But since the filters are not working, I am not really sure what to do. My other option is to update ALL of those measures for a specific record type, then create another set for the other record type. Its just a ton of work to do so.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.