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

Anonymous
Not applicable

## Cumulative doesn't give the correct numbers

Hi guys,

I am trying to create my own forecast because it is based on a planning.

To do this I have a few measures and some data to go with it.

Measure to determine the price of the hours in a certain month:

Planning = sumx('Forecast'; 'Forecast'[Hours] * 'Forecast'[PriceFC])

Measure to calculate the cumulative total of the worked hours
CumulativeTotal = CALCULATE(Sum(TimeTransactions[AmountFC]);FILTER(ALL(PowerBI_Calendar[Date]); PowerBI_Calendar[Date] <= Max(PowerBI_Calendar[Date])))

Measure to determine if I need to use the actual worked hours or the planning:
GuideLine = IF(OR(SUMX(TimeTransactions; TimeTransactions[AmountFC]) = BLANK(); SUMX(TimeTransactions; TimeTransactions[AmountFC]) < [Planning]); [Planning]; SUM(TimeTransactions[AmountFC]))

Measure to get the cumulative total of my guideline so it can be shown nicely in a graph:
Cumulative Forecast = CALCULATE([GuideLine];FILTER(ALL(PowerBI_Calendar[Datum]); PowerBI_Calendar[Datum] <= Max(PowerBI_Calendar[Datum])))

The problem lies with the Cumulative forcast, it should be a different number than it is showing.
Does anyone know what I am doing wrong?

7 REPLIES 7
Anonymous
Not applicable

@v-kelly-msft  "maand" (or month) is part of the PowerBI_Calendar, it didn't help unfortunatly to add the "Datum" column.

@amitchandakhere is some sample data, it's all data for one project that is also how they are usually connected.

Thanks for the help so far!

Best regards,

Queenie

Super User

@Anonymous

What is your cumulative formula? As you are shared data with month, I doubt if the same month has been used. Not the month number or Month Year(YYYYMM) or date . Because in that it might do text sorting for cumulative.

Anonymous
Not applicable

@amitchandakI am not quite sure what you are asking.

But I shared all the measure in the post so I hope you can find what you need there.

I will also add a screenshot of my Calendar Table, maybe that answers some questions.

If it doesn't please let me know.

Community Support

Hi @Anonymous ,

Drag the column PowerBI_Calendar[Datum] to the table visual to see if it shows correctly?

Best Regards,
Kelly

Super User

@Anonymous Can you share sample data and sample output. make me @

Super User

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

DAX is easy, CALCULATE makes DAX hard...
Super User

Can you share sample data and sample output.

Mark me @

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.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors