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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Accrue values by date

Hello everyone. I'm starting with this Power Bi thing. I have this table:

roppozoppo_0-1668362241392.png

in Power Bi see it like this:

roppozoppo_1-1668362268530.png

What I want is for them to accumulate to see it like this:

roppozoppo_0-1668363016569.png

That is, to accumulate by dates. Can anyone help me? Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @roppozoppo ,

 

The solution is a bit complex but I made it.

And it is done in Power Query.

1.Copy a main table, then delete the other columns, and keep a distinct field, NOMBRE.

vstephenmsft_0-1669627393206.png

 

2.Add an index column. It's to sort the NOMBRE column.

vstephenmsft_1-1669627554779.png

 

3.Add a custom column to crossjoint the date table. The date table is Table (3). It contains all distinct dates from main table. Expand it.

vstephenmsft_3-1669627649256.png

vstephenmsft_2-1669627637798.png

4.Merge the new table with the main table as follows. Expand the MONTO column.

vstephenmsft_4-1669627686660.png

vstephenmsft_5-1669627714930.png

5.Fill down the MONTO column group by the NOMBRE column.

vstephenmsft_6-1669627775768.png

vstephenmsft_7-1669627783497.png

 

6.Filter out the null of the MONTO column.

vstephenmsft_8-1669627815945.pngvstephenmsft_9-1669627822823.png

 

7.Sort the NOMBRE column by the Index column. Here's the result.

vstephenmsft_10-1669628032465.png

vstephenmsft_11-1669628056412.png

 

You can download the attachment for details.

 

Best Regards,

Stephen Tao

 

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

View solution in original post

11 REPLIES 11
Anonymous
Not applicable

Hi @roppozoppo ,

 

The solution is a bit complex but I made it.

And it is done in Power Query.

1.Copy a main table, then delete the other columns, and keep a distinct field, NOMBRE.

vstephenmsft_0-1669627393206.png

 

2.Add an index column. It's to sort the NOMBRE column.

vstephenmsft_1-1669627554779.png

 

3.Add a custom column to crossjoint the date table. The date table is Table (3). It contains all distinct dates from main table. Expand it.

vstephenmsft_3-1669627649256.png

vstephenmsft_2-1669627637798.png

4.Merge the new table with the main table as follows. Expand the MONTO column.

vstephenmsft_4-1669627686660.png

vstephenmsft_5-1669627714930.png

5.Fill down the MONTO column group by the NOMBRE column.

vstephenmsft_6-1669627775768.png

vstephenmsft_7-1669627783497.png

 

6.Filter out the null of the MONTO column.

vstephenmsft_8-1669627815945.pngvstephenmsft_9-1669627822823.png

 

7.Sort the NOMBRE column by the Index column. Here's the result.

vstephenmsft_10-1669628032465.png

vstephenmsft_11-1669628056412.png

 

You can download the attachment for details.

 

Best Regards,

Stephen Tao

 

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

You are a genius!!!! Thank you very very very much! This is what i looking for!!! 

Regards

aj1973
Community Champion
Community Champion

Hi @Syndicate_Admin 
add a date table and try this:

Sales running total in Date =
CALCULATE(
    SUM[Monto],
    FILTER(
        ALLSELECTED('Date Table'[Date]),
        ISONORAFTER('Date Table'[Date], MAX('Date Table'[Date]), DESC)
    )
)

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Shaurya
Memorable Member
Memorable Member

Hi @Syndicate_Admin,

 

Instead of using Monto as the field in the matrix you can create this measure and use it:

 

Cumulative = CALCULATE(SUM('Table'[Monto]), FILTER('Table', DATESBETWEEN('Table'[Date], MIN('Table'[Date]),'Table'[Date])))

 

Works for you? Mark this post as a solution if it does!
Check out this blog of mine: How to Export Telemetry Data from Azure IoT Central into Power BI

 

Hello @Syndicate_Admin, thanks for the reply. I did what you told me and this gave me back the Power Bi

roppozoppo_0-1668376447477.pngroppozoppo_1-1668376474842.png

It doesn't work for me...

roppozoppo_2-1668376543246.png

Here is the Excel row

https://files.fm/f/u7h6axkkk

Hi @Syndicate_Admin 
First you need to add a Date Table

aj1973_1-1668378335623.png

 

here is your DAX

Sum of Numbre running total in Date =
VAR _NOMBRE = SELECTEDVALUE(Hoja1[NOMBRE])
RETURN
CALCULATE(
    SUM(Hoja1[MONTO]),
    FILTER(
        ALLSELECTED('Date Table'[Date]),
        ISONORAFTER('Date Table'[Date], MAX('Date Table'[Date]), DESC)
    )
    , Hoja1[NOMBRE] = _NOMBRE
)
 
aj1973_0-1668378042721.png

If you wanted to add 0 instead of Blanks then put the formula into IF condition

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

What am I doing wrong???

roppozoppo_0-1668383091717.png

I'm making a measure and it doesn't work for me

Add the ' )' in SUM function right before the comma 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

roppozoppo_0-1668425534802.png

I added ")" but below I see that you put TABLE (DATE) and I do not have a table. I have a date column that is on SHEET1(DATE). Maybe you need to do something to create a separate table with the date?

Add a calendar Table with DAX

Date Table = CALENDARAUTO(12)

the join to your table

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

roppozoppo_1-1668426552741.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.