cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AutoKris
Frequent Visitor

Cumulative report using data items with two attributes (Planned vs Actual Date)

Hi All,
Just starting with Power BI, took 15h courses, still hard for me to get around below problem.

I have data table with a list of projects with attributes such as potential efficiency savings in hours, statuses and with planned and actual completion dates.
I need to present a report as below image attached, a table and line chart showing cumulated values of savings by month period with two lines, planned vs actual.
See the sample file with RAW DATA TABLE sheet and the actual RESULT sheet to be obtained but in Power BI.
Please suggest simple approach for solution 🙂

 

Result Table and ChartResult Table and Chart

 

 

 

 

1 ACCEPTED SOLUTION
AutoKris
Frequent Visitor

Hi All, thanks for your inputs.

I actually resolved it using the Transformation process, creating two new tables for Planned and Actual dates, leaving only the values of Benefits and the last month date.

 

Secondly to created a cumulated value I created new measures for both using the CALCULATE formula.

 

Actual Efficiency (h) = CALCULATE (
SUM ('Completed Efficiency'[Actual Closure Month]),
FILTER (ALL ('Completed Efficiency'[ActualEndDate] ), 'Completed Efficiency'[ActualEndDate] <= MAX ( 'Completed Efficiency'[ActualEndDate])))

View solution in original post

3 REPLIES 3
AutoKris
Frequent Visitor

Hi All, thanks for your inputs.

I actually resolved it using the Transformation process, creating two new tables for Planned and Actual dates, leaving only the values of Benefits and the last month date.

 

Secondly to created a cumulated value I created new measures for both using the CALCULATE formula.

 

Actual Efficiency (h) = CALCULATE (
SUM ('Completed Efficiency'[Actual Closure Month]),
FILTER (ALL ('Completed Efficiency'[ActualEndDate] ), 'Completed Efficiency'[ActualEndDate] <= MAX ( 'Completed Efficiency'[ActualEndDate])))
v-xiaotang
Community Support
Community Support

Hi @AutoKris 

Since not sure how to calculate the Actual benefit and Actual in your image, I'll use Plan as an example. I think their logic is the same. You can refer to the calculation process of Plan.

(1) create a calendar table

vxiaotang_0-1644821715693.png

(2) create the measures below,

Planned Benefit (h) =
CALCULATE (
    SUM ( 'Table'[Benefit (hours)] ),
    FILTER (
        ALL ( 'Table' ),
        YEAR ( 'Table'[PlannedClosureDate] ) = MIN ( 'calendar'[Y] )
            && MONTH ( 'Table'[PlannedClosureDate] ) = MIN ( 'calendar'[M] )
    )
)

 

Plan = 
VAR _endDate =
    EDATE ( MIN ( 'calendar'[Date] ), 1 )
RETURN
    SUMX (
        FILTER ( ALL ( 'Table' ), 'Table'[PlannedClosureDate] < _endDate ),
        'Table'[Benefit (hours)]
    )

 

result

vxiaotang_0-1646808933743.png

Best Regards,

Community Support Team _Tang

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

amitchandak
Super User
Super User

@AutoKris , refer if one the two blogs, dealing with two dates can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Top Solution Authors