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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Getting week wise count for all rows excluding the row context

Dear Community,

 

I need to get the count of the error per week in matrix for each row without splitting the count per row wise. Have given the data and the required output. Please help me to solve this issue.

 

Please see the image below 

have given the column calculation highlighted in yellow for reference. Need the matrix to be the percentage of the week's total

count help.png

Data 

numberSystemErrorLMDateLMDateKeyWeek
3078S5Yes2020-02-03202002036
3333S5Yes2020-01-29202001295
2142S9Yes2020-02-06202002066
4391S6Yes2020-02-04202002046
75S3Yes2020-01-29202001295
497S3Yes2020-01-29202001295
4579S5Yes2020-01-29202001295
839S7Yes2020-01-31202001315
2682S7Yes2020-01-31202001315
4598S7Yes2020-01-27202001275
1367S1Yes2020-02-07202002076
1993S1Yes2020-02-07202002076
2296S7Yes2020-02-07202002076
3506S7Yes2020-02-07202002076
3159S7Yes2020-02-07202002076
4743S4Yes2020-02-06202002066
2310S8Yes2020-01-29202001295
3296S7Yes2020-01-29202001295
140S7Yes2020-01-30202001305
356S7Yes2020-01-29202001295
3533S6Yes2020-01-28202001285
543 Yes2020-01-27202001275
404S1Yes2020-02-05202002056
3953S7Yes2020-01-30202001305
622S7Yes2020-01-30202001305
4009S6Yes2020-01-30202001305
438S6Yes2020-01-29202001295
464S2Yes2020-01-29202001295
3702S6Yes2020-01-27202001275
4682S5Yes2020-02-06202002066
2189S7Yes2020-02-06202002066
3777S7Yes2020-01-31202001315
2894S7Yes2020-02-07202002076
1742S6Yes2020-01-28202001285
3235S7Yes2020-01-28202001285
4750S7Yes2020-01-28202001285

 

Thanks in advance.

4 REPLIES 4
HotChilli
Super User
Super User

Create 3 measures:

Error Count = COUNT(TableDa[Error]) 

WeekErrors = CALCULATE([Error Count], ALLEXCEPT(TableDa, TableDa[Week]))

ErrorCount% = DIVIDE([Error Count], [WeekErrors])

 

In a matrix,

put System in Rows,

Week in Columns,

[Error Count] and [ErrorCount%] in Values

Anonymous
Not applicable

Hi @HotChilli ,

Thanks for your immediate response. 

I tried the solution you gave and im still getting the total for the week getting split as the system in the rows. Please see the image below.

I need the 9 Week Errors as the total of week that is 23 for 5 & 13 for 6 in the column so i could get the respective error %. 

Please suggest. Thanks in Advance

Count help update.png

Post your pbix and i'll have a look.

This is what I get at my end

Annotation 2020-02-26 112149.png

Anonymous
Not applicable

Hi @HotChilli ,

 

I am having the Week from the a date table and joined the same via the Datekey in the source table. does this solution will work only if the week is from the same table?.

 

Please let me know. 

Thanks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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