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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
SUMESHKUMAR22
Helper IV
Helper IV

Matrix custom Row Total

Hi community,

I'm stuck in a urgency to achieve the attached row total requirement. Please refer the atttached expected screenshots.

Pbix sample screenshot: Pbix Link 
Instetad of showig the individual total for each monthyear it should give a single Totalsum by Department & phase wise (In-program & pre-program).
What measure should be written to achive this ?
pbix SS.png

Sample image for reference (Optional) :
Expected.png

Let me know if any clarification needed.

Thanks in advance!

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@SUMESHKUMAR22 

I think I didn't understand the requirement completely, however try this measure:

Total Hours = 
IF(
    ISINSCOPE( data[Resource name] ) && SELECTEDVALUE( data[Phase] ) =  "In-Program",
    SUM( data[TOTAL_HOURS_BILLED] ),
    CALCULATE( SUM( data[TOTAL_HOURS_BILLED] ) , ALLSELECTED( data[TIMESHEET MONTH YEAR] )  )
)

Fowmy_0-1704537702468.png

 





Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

@SUMESHKUMAR22 

You cannot merger cells in the total row like you do in 

excel.

Regarding your second question, you can remove the filter and use it as follows:

 

Total Hours = 
IF(
    ISINSCOPE( data[Resource name] ),
    SUM( data[TOTAL_HOURS_BILLED] ),
    CALCULATE( SUM( data[TOTAL_HOURS_BILLED] ) , ALLSELECTED( data[TIMESHEET MONTH YEAR] )  )
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
Fowmy
Super User
Super User

@SUMESHKUMAR22 

I think I didn't understand the requirement completely, however try this measure:

Total Hours = 
IF(
    ISINSCOPE( data[Resource name] ) && SELECTEDVALUE( data[Phase] ) =  "In-Program",
    SUM( data[TOTAL_HOURS_BILLED] ),
    CALCULATE( SUM( data[TOTAL_HOURS_BILLED] ) , ALLSELECTED( data[TIMESHEET MONTH YEAR] )  )
)

Fowmy_0-1704537702468.png

 





Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy , 
Is it possible to do the conditional formatting on the higlighted column Total?
Screenshot 2024-01-06 164021.png
Thnaks in advance!

@SUMESHKUMAR22 

Yes, it is possible, open a seperate question as the solution I gave you is to resolve your original question. Accept it as a solution if it works for you.
 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy , Thanks for the prompt response.
Is it possible to get the 195.20 to be displayed 1 time across the row instead of repeating it for every monthyear ? Just to get the row totals should get displayed once.

Also, to run this measure for all phases should I remove the 'In-program' filter ?

Total Hours = 
IF(
    ISINSCOPE( data[Resource name] ) && SELECTEDVALUE( data[Phase] ),
    SUM( data[TOTAL_HOURS_BILLED] ),
    CALCULATE( SUM( data[TOTAL_HOURS_BILLED] ) , ALLSELECTED( data[TIMESHEET MONTH YEAR] )  )
)



Thanks ,

@SUMESHKUMAR22 

You cannot merger cells in the total row like you do in 

excel.

Regarding your second question, you can remove the filter and use it as follows:

 

Total Hours = 
IF(
    ISINSCOPE( data[Resource name] ),
    SUM( data[TOTAL_HOURS_BILLED] ),
    CALCULATE( SUM( data[TOTAL_HOURS_BILLED] ) , ALLSELECTED( data[TIMESHEET MONTH YEAR] )  )
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.