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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
TinyElephant
Helper III
Helper III

Handling Negative Entries in Data

Hello community members,

I have an Excel timesheet with data on the daily work hours of employees for different projects. I am creating a Power BI dashboard to display this information. However, some of the data contains negative values for specific days and projects, which are a result of later corrections made to the timesheet system. For example, if an employee worked 8 hours in total for a day, they may have initially reported 8 hours worked on Project X, but later corrected it to 8 hours worked on Project Y (or multiple projects), causing the original Project X hours to be recorded as negative. I need to find a way to handle/clean these negative entries so that the Power BI dashboard accurately reflects the employee's work hours.

TinyElephant_0-1675851938587.png


Below is the simplified data. 

 

EmployeeProjectDateHours
Employee AProject A08-Feb-234.00
Employee AProject A08-Feb-23(4.00)
Employee AProject B08-Feb-238.00
Employee BAnnual Leave08-Feb-238.00
Employee BAnnual Leave08-Feb-23(8.00)
Employee BProject A08-Feb-236.00
Employee BProject B08-Feb-232.00
3 REPLIES 3
TinyElephant
Helper III
Helper III

Apparently, I noticed that if I leave them as it is, the visuals automatically account for the negative values.

TinyElephant_0-1676337605477.png

 

v-cgao-msft
Community Support
Community Support

Hi @TinyElephant ,

 

Not sure, do you want to calculate the sum of all values with positive numbers?

Total Hours = CALCULATE(SUM('Table'[Hours]),'Table'[Hours]>=0)

vcgaomsft_0-1675921781352.png

If I misunderstand your needs, please tell me what your expected output is and how it is calculated.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

amitchandak
Super User
Super User

@TinyElephant , In power BI use a measure = Sum(Table[Hours]) , with all other column

 

Also, you can use visual level filter measure <> 0

 

or anew measure

 

measure 1=

if([Measure] =0, blank(), [Measure])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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