cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## Power Bi Working hours

Hello,

I am having issues with working hours table created in power Bi. I created working hours for the year 2024. However, power Bi is showing negative values for the month August 2024. Ideally it should show zero since August is yet to come.

I am lost as I don't know why this is happening as  the values for the rest of the month is correct.

Any help is greatly appreciated!

Thanks

6 REPLIES 6
New Member
New Member

Above is a sample example of the issue . The values shown are the sum of working hours for each month for the year 2024. The values are correct for all the months until July. For the month of August, sum of working hours should be 0 since no one worked for August yet however it's showing negative value .

Thanks

Super User

@NMK Yeah, no. Need source data from which this was calculated.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Community Support

Hi @NMK ,

Since I don't have your data source, I assumed a table and did a test for your reference.

My Model View:

Month = [Date].[Month]

MonthNo = 'Table'[Date].[MonthNo]

The MonthNo column is used to sort the months by numeric size in the visualization.

Measure =

VAR _today = MONTH(CALCULATE(MAX([Date]), ALL('Table')))

VAR _sum = CALCULATE(SUM('Table'[Value]), ALLEXCEPT('Table', 'Table'[Month]))

RETURN

IF(MONTH(MAX([Date])) < _today, _sum, 0)

If this sample data is structurally different from the one you are using, please provide detailed sample data and the results you are hoping for. How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.

Best Regards,

Sunshine Gu

Super User

@NMK I second @SachinNandanwar Here is some information to help you frame your question. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Resolver III

Please post some sample data for everyone to understand your problem better.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.