Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I need help in creating a Running Total measure, but what is important - it should be based on projects, not dates.
Usually, Running Total is created by date, we start in January and increase e.g. the sum of sales with each month.
Now I have to create this sum, but based on the size of the project (% share of costs in the total).
First we take the largest project, then add a smaller and smaller one to it...
The table has to show the 10 largest projects.
The table is also to be filtered by various filters, such as the date, so the project position cannot be set hard.
If, for example, each project was permanently assigned a rank (in PQ or a calculated column in DAX), then the filter will not work on this rank.
The largest project in January may already be finalized in February and may not appear in the data from February at all.
Therefore, everything has to be dynamic.
Below is a table showing how it should look like.
Anyone have any idea how to come to this?
(P.S. Cost and Cost% are DAX measures).
Solved! Go to Solution.
I've found a sulution (article i Polish).
It was so simple... <facepalm>
Cumulative Total =
VAR total_sales = [Total Sales]
RETURN
IF (
NOT ( ISBLANK ( total_sales ) ),
CALCULATE (
[Total Sales],
FILTER ( ALLSELECTED ( Sales[Product] ), total_sales <= [Total Sales] )
)
)
https://cwiok.pl/index.php/pl/2019/06/02/skumulowana-suma-po-produktach-w-daxie/
I've found a sulution (article i Polish).
It was so simple... <facepalm>
Cumulative Total =
VAR total_sales = [Total Sales]
RETURN
IF (
NOT ( ISBLANK ( total_sales ) ),
CALCULATE (
[Total Sales],
FILTER ( ALLSELECTED ( Sales[Product] ), total_sales <= [Total Sales] )
)
)
https://cwiok.pl/index.php/pl/2019/06/02/skumulowana-suma-po-produktach-w-daxie/
@amitchandak What do you mean by "Table[project] <= max(Table[project]" ?
Table[project] is a name of the project and it's dummy data.
@AnetaK , create a measure like
divide(calculate( sum(Table[cost]), filter(allselected(Table), Table[project] <= max(Table[project]))) ,calculate( sum(Table[cost]), allselected(Table)))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
9 | |
9 |