March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I am new to Power BI and am hoping someone can provide assistance. I want to create running totals that are based on both dates and group(s). The first four columns is the test data (TaskTimePhaseDataSet table) I am working from. And the final two columns are my expected calculations. After reviewing many posts and blogs I am not able to get the desired results. Below is the DAX expression I finished on (to get accumulated Task actual work values - column 5 in the table below) but it is not correct and I have reached my DAX (knowledge) limit.
Cumulative Task Actual Work=CALCULATE ( SUM (TaskTimephasedDataSet[TaskActualWork]), FILTER ( ALL (TaskTimePhasedDataSet), TaskTimePhasedDataSet[TimeByDay] <= MAX(TaskTimePhasedDataSet[TimeByDay]) && TaskTimePhasedDataSet[TaskName] <= TaskTimePhasedDataSet[TaskName] ) )
Ideally I would like
Table is TaskTimePhaseDataSet
Project Name | TaskName | TimeByDay | TaskActualWork | Cumulative Task Actual Work | Cumulative Project Actual Work |
Project 1 | Task 1 | 18/03/2017 | 4 | 4 | 4 |
Project 1 | Task 1 | 19/03/2017 | 5 | 9 | 9 |
Project 1 | Task 1 | 20/03/2017 | 3 | 12 | 12 |
Project 1 | Task 2 | 23/03/2017 | 2 | 2 | 14 |
Project 1 | Task 2 | 25/03/2017 | 3 | 5 | 17 |
Project 1 | Task 2 | 26/03/2017 | 4 | 9 | 21 |
Project 2 | Task 1 | 18/03/2017 | 7 | 7 | 7 |
Project 2 | Task 1 | 24/03/2017 | 8 | 15 | 15 |
Project 2 | Task 1 | 27/03/2017 | 8 | 23 | 23 |
Project 2 | Task 3 | 29/03/2017 | 7 | 7 | 30 |
Project 2 | Task 3 | 29/03/2017 | 4 | 11 | 34 |
Project 2 | Task 3 | 30/03/2017 | 5 | 16 | 39 |
Any help greatly appreciated.
Solved! Go to Solution.
Hi @Lenin,
You can create measures like below:
Cumulative Task Actual Work = CALCULATE(SUM(Table2[TaskActualWork]),FILTER(ALL(Table2),'Table2'[TimeByDay]<=MAX('Table2'[TimeByDay])),VALUES(Table2[Project Name]),VALUES(Table2[TaskName]))
Cumulative Project Actual Work = CALCULATE(SUM(Table2[TaskActualWork]),FILTER(ALL(Table2),'Table2'[TimeByDay]<=MAX('Table2'[TimeByDay])),VALUES(Table2[Project Name]))
Best Regards,
Qiuyun Yu
Hi @Lenin,
You can create measures like below:
Cumulative Task Actual Work = CALCULATE(SUM(Table2[TaskActualWork]),FILTER(ALL(Table2),'Table2'[TimeByDay]<=MAX('Table2'[TimeByDay])),VALUES(Table2[Project Name]),VALUES(Table2[TaskName]))
Cumulative Project Actual Work = CALCULATE(SUM(Table2[TaskActualWork]),FILTER(ALL(Table2),'Table2'[TimeByDay]<=MAX('Table2'[TimeByDay])),VALUES(Table2[Project Name]))
Best Regards,
Qiuyun Yu
I have similar situation and if you can help me with this :
i wants to calculate new column in above D .
based on todays date
thanks
Qiuyun, thanks so muck for the help. It works perfectly.
Lenin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |