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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
UncleLewis
Responsive Resident
Responsive Resident

Matrix Total Count Repeat Each Line

Hi all,

I am trying to get Lifetime count of repairs and retun the same count on every line reagrdless of other context in Matrix/Table
In the screen shot, I'm getting "1" on each line. I'm trying to return the total count of repairs for the SN on each line so each line should show "5"

Here's my current Measure: (I've tried many versions, but nothing is quite right)

SN Repair Count =
CALCULATE(
[Total Repair Count],
FILTER(SN,SN[SN]=SELECTEDVALUE(SN[SN]))
)

Thanks,
-w



Historical_Count.png

1 ACCEPTED SOLUTION

I ended up using Aggregated Table to solve this problem.
Now every row in the Table/Matrix shows the total count of repairs based on the S/N and regardless of Filter Context.

Aggregated Tables may not solve all Power BI reporting needs - but definitely solved this one.

Thanks,
-w

View solution in original post

5 REPLIES 5
UncleLewis
Responsive Resident
Responsive Resident

Thanks Ashish,

That works as long as I only have SN and WO in the Matrix.
As soon as I add a new field to the Matrix, the Value goes back to displaying 1 on the Row Value.
Is there a way to use ALLEXCEPT or other function to handle all cases whether I have 1-2 items on Rows or 30?

Thanks,
-w

I ended up using Aggregated Table to solve this problem.
Now every row in the Table/Matrix shows the total count of repairs based on the S/N and regardless of Filter Context.

Aggregated Tables may not solve all Power BI reporting needs - but definitely solved this one.

Thanks,
-w

Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

SN Repair Count = CALCULATE([Total Repair Count],ALL(SN[WO]))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks Ashish,

Sorry, that does not work
I tried changing to ALL(SN[SN]) since WO does not exist in table SN
I uploaded the pbix here

Thanks,
-w

Hi,

This measure works

SN Repair Count_2 = if(isblank([Total Repair Count]),blank(),CALCULATE([Total Repair Count],ALL(Data[WO])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors