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

Matrix report -sliced data substract

I need to substract hours from Reg hours column in Power BI. How can I achieve the Final hours calculation in power BI

 

 

EmployeeLeave TypeTrans hrsRegular Hrs
ABCSIck Leave840
ABCAnnual Leave640
ABCDH Leave440
XYZSIck Leave1240
XYZAnnual Leave1040
XYZDH Leave840

 

Report requiremnt as below. I am able to get the below report in matrix by placing Leave type in column section of Matrix view. But unable to do substract RH-total hrs.

 

EmployeeReg HrsSLALDHTotalFinal Hrs
ABC408641840-18
XYZ40121083040-30
3 REPLIES 3
Anonymous
Not applicable

If these are columns you can use SUM Function    Hrs = Sum('Table'[Hrs]) - Sum('Table'[Total Hrs])

Anonymous
Not applicable

You need to create a measure
Hrs = [Hrs] - [Total Hrs]

How do you pickup total hours, it will be generated dynamically. There is no column to hold total

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.