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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bhatfield
Regular Visitor

Use previous total with blank cumulative data

I am running aggregate totals based on GL for one of my reports. There is a gap in entries for a few periods where i would like to carry the previous periods amount if there were no transactions that period. Cant seem to get the logic after the initial cumulative code.  THanks

 

bhatfield_0-1663684070604.png

 

5 REPLIES 5
bhatfield
Regular Visitor

I am sorry i shouldve been more specific. I do not have an issue with the cumulative total rather when i try to break out the individual GLs and there is no entry for that specific period. This example shows me filtering the cumulative total and in period 6 there is no value so in the table it shows up as blank where i want it to show 27480.48 until period 7 where there is a new entry

bhatfield_0-1663685480072.png

 

PabloDeheza
Solution Sage
Solution Sage

Hi there!

For cumulative sum you try this:

CALCULATE (
    SUM ( ColumnToSum ),
    FILTER (
        ALL ( DateTable ),
        DateTable[Date] <= MAX ( DateTable[Date] )
    )
)

Let me know if that helps!

amitchandak
Super User
Super User

@bhatfield , The FiscalProfilePeriod should be a separate table like the date table. and period on axis should also come from FiscalProfilePeriod 

 

and use all on table in place of table column

 

filter(all(FiscalProfilePeriod ), <rest of the code >

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

i figured it out

 

bhatfield_0-1663686355555.png

 

 

those dates are from a profile that is fiscal period the date table is separate from them

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.