Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
If I have a column in a table for amounts (Table[Amounts]) and another column with the year correlated to those amounts (Table[Year]). Currently if I had a bar graph with the amounts as the Y axis and the years as the X axis, it would show the sum of the amounts that correlate to their years for each year. Is it possible to instead show the sum of all the amounts of all prior years for each year?
For example, if 2001 had 10000.60 as its sum of amounts and 2002 had 5000.00, I would want the year 2002 to be represented by 15000.60 not 5000.00.
Thank you in advance!
Solved! Go to Solution.
Hi! Check out this running total article from SQLBI: Computing running totals in DAX - SQLBI
Proud to be a Super User! | |
Hi @srpeters ,
Thanks for @audreygerred reply.
Here are some steps you can try:
Sample data
Create a calculate column
Totalization =
CALCULATE(
SUM('Table'[Amounts]),
FILTER(
'Table',
'Table'[Year] <= EARLIER('Table'[Year])
)
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @srpeters ,
Thanks for @audreygerred reply.
Here are some steps you can try:
Sample data
Create a calculate column
Totalization =
CALCULATE(
SUM('Table'[Amounts]),
FILTER(
'Table',
'Table'[Year] <= EARLIER('Table'[Year])
)
)
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
This worked, thank you!
Hi! Check out this running total article from SQLBI: Computing running totals in DAX - SQLBI
Proud to be a Super User! | |
User | Count |
---|---|
84 | |
81 | |
65 | |
52 | |
46 |
User | Count |
---|---|
100 | |
48 | |
42 | |
39 | |
38 |