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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
nikkirai
Frequent Visitor

Calculate target and actual with cumulative sum

Hi all,

 

I have 2 tables: Target and Actual&Forecast. The Target table has a Date column and an ItemCount column. The Actual&Forecast has a Date column and an ItemCount column. I want to create a line graph that shows cumulative target item counts vs cumulative actual&forecast item counts on the y-axis and Date on the x-axis. 

 

The Target Line Graph is working fine with this:

Target Cumulative Sum  = CALCULATE(SUM('Target'[ItemCount]), FILTER(ALL('Target'), 'Target'[Date] <=max('Target'[Date])))

 

But I couldn't get the Actual&Forecast Line Graph to work with this:

Actual Cumulative Sum  = CALCULATE(SUM('ActualandForecast[ItemCount]), FILTER(ALL('ActualandForecast'), 'ActualandForecast'[Date] <=max('ActualandForecast'[Date])))

 

The Actual&Forecast line is showing more counts than target at a given date. How is this possible? How do you make the forecast part dotted line to separate from actual? Thank you for your help!

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @nikkirai 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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