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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Tango2310
Helper I
Helper I

Compound Values

Hi,

New to Power BI.

I have a table of date an invoice values and am trying to work out how to make the line compound in other words build on the totals to the left.

 

Tango2310_0-1723094579996.png

 

In other words

1st data point would be sum of the 01/08

2nd data point would be the  sum of the 02/08 + the sum of the 01/08

3rd data point would be sum of the 03/08 + the sum of the 02/08 + sum 01/08

and so on.

 

Any help as to how to achieve this would be greatly appreciated.

 

Thanks

 

Todd

1 ACCEPTED SOLUTION
AnkitaaMishra
Super User
Super User

Hi @Tango2310 ,
please refer below video to create running total measure using DAX : 
https://www.youtube.com/watch?v=NBGGHdKxupk&t=347s

use that measure to plot your graph.
let me know if this works for you or share additional details for your requirement.

Thanks,

Ankita

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Try this approach

  1. Create a Calendar table with calculated column formulas for Year, Month name and Month number.  Sort the Month name by the Month number.
  2. Create a relationship from the Date column of the Data Table to the Date column of the Calendar table
  3. To the X-axis, drag Date from the Date column of the Calendar Table
  4. Write these measures

Total = sum(Data[invoice value])

RT = calculate([Total],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Tango2310
Helper I
Helper I

Thank you everyone

 

Anonymous
Not applicable

Hi @Tango2310 ,

Do you want to find the composite value of the month?

If so, I did a test for your reference.

In my scenario:

My Model View:

Table:

vyetonggumsft_4-1723103625641.png

Table 2 =SUMMARIZE('Table','Table'[Date],"sum",SUMX('Table',[Invoice Value]))

vyetonggumsft_5-1723103637087.png

My Report View:
my =var _table=SUMMARIZE(ALL('Table'),'Table'[Date],"sum",SUMX('Table',[Invoice Value]))
return
SUMX(FILTER(_table,[Date]<=MAX('Table'[Date])),[sum])

vyetonggumsft_6-1723103637096.png

Best Regards,

Sunshine Gu

Thank you @Anonymous what would the query be if i was just creating a measure?

SachinNandanwar
Impactful Individual
Impactful Individual

Just incase if you want to display running total across

Running Total =
VAR _Total =
    CALCULATE (
        SUM ( Inv[Invoice Value] ),
        OFFSET (
            -1,
            (
                ALLEXCEPT (
                    Inv,
                    Inv[Date].[Date]
                )
            ),
            ORDERBY ( Inv[Date], DESC ),
            PARTITIONBY ( Inv[Date] )
        )
    )
RETURN
    _Total + SUM ( Inv[Invoice Value] )

 

SachinNandanwar_0-1723098746174.png

 

each row



Regards,
Sachin
Check out my Blog
AnkitaaMishra
Super User
Super User

Hi @Tango2310 ,
please refer below video to create running total measure using DAX : 
https://www.youtube.com/watch?v=NBGGHdKxupk&t=347s

use that measure to plot your graph.
let me know if this works for you or share additional details for your requirement.

Thanks,

Ankita

TrevLc
Helper III
Helper III

You can use visual level calculations to create a running sum formula, or you can create a measure like this:

running sum =
CALCULATE(sum('Table'[Amount]),
FILTER (
ALL ( 'Table' ),
'Table'[Date] <= MAX ( 'Table'[Date] )
))

Thanks @TrevLc, Im not getting error messager with your approach but the numbers are way incorrect

 

Tango2310_0-1723698231218.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors