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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
nicoenz
Helper III
Helper III

Running total values and value for future periods

Hi everyone,

i have a table that contains Volume data for December and January. As of January 7, there's no more data

 

The running total measure that i use:

Running total =   var Turro = CALCULATE(SUM('Table'[Volume]),
                            filter(ALL('Table'),'Table'[Fiscal year/period] = MAX('Table'[Fiscal year/period])),
                            filter(ALL('Table'),'Table'[WorkDayPeriod] <= MAX('Table'[WorkDayPeriod])))
                           
                            return
                            If(Turro <>0,
                                Turro,
                                Turro+ CALCULATE(SUM('Table'[Volume]),REMOVEFILTERS('Table'[WorkDayPeriod]))
                                )

gives the following table:
nicoenz_0-1704897767941.png

 

Since there are no future data after January 7 there's no value at all but I would like to have a flat line from day 7 till 22 with the last value.
 
nicoenz_0-1704895134426.png

 

 

How can I make it?

 

Regards and happy 2024!

1 ACCEPTED SOLUTION

I couldn't make it work because future dates were not included so the measures didn't know what to do. I solved it by adding a manual table with future dates, appending this new table with my FactTable, adjusting the measures and voila!!!

i guess it's not the best and tidiest way of doing it but it works so far

View solution in original post

9 REPLIES 9
nicoenz
Helper III
Helper III

Hi @Anonymous and @Ashish_Mathur Ashish

here's the link to the file: https://drive.google.com/file/d/1ynTnYK1FaCR-vPr5h8z6zEBfo_4lyddo/view?usp=drive_link 

Thanks for your help!!!!!!!

Access Denied message.


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

didnt give access to all with the link. sorry

please try again: https://drive.google.com/file/d/1ynTnYK1FaCR-vPr5h8z6zEBfo_4lyddo/view?usp=sharing 

Hi,

  1. Create a relationship (Many to One and Single) from the Posting Date column of Table to the Date column of the DateTable.
  2. Create the WorkDayPeriod column in the DateTable
  3. In the Table visual, drag the WordDayPeriod and Date columns from the DatTable

Make these changes and share the link of the revised PBI file.


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

Hi @Ashish_Mathur ,

done!! it kind of works but the flat segment on the last days is that the initial value level instead of the last value level. See pbix file

https://drive.google.com/file/d/1bKbBZQ3k1Ql1jgDYztiXmRtxOzROD1F_/view?usp=sharing 

thanks again!!!!!

I couldn't make it work because future dates were not included so the measures didn't know what to do. I solved it by adding a manual table with future dates, appending this new table with my FactTable, adjusting the measures and voila!!!

i guess it's not the best and tidiest way of doing it but it works so far

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @nicoenz ,

Thanks for reaching out to us with your problem. Base on your description, it seems that you want to get the running total for the future dates. You can follow the steps to get it:

1. Create a separated date dimension table(DO NOT create any relationship with your fact table)

2. Apply the date field of date dimension table on X-axis of your line chart

3. Update the formula of measure [Running total] as below

Running total =
VAR Turro =
    CALCULATE (
        SUM ( 'Table'[Volume] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Fiscal year/period] = SELECTEDVALUE ( 'Date'[Date] )
        ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[WorkDayPeriod] <= SELECTEDVALUE ( 'Date'[Date] )
        )
    )
RETURN
    IF (
        Turro <> 0,
        Turro,
        Turro
            + CALCULATE ( SUM ( 'Table'[Volume] ), REMOVEFILTERS ( 'Table'[WorkDayPeriod] ) )
    )

If the above one can't help you get the expected result, please provide some raw data in your table (exclude sensitive data) with Text format, your line chart Fields settings and your expected result with special examples and screenshots. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Hi Rena, i tried and couldn't make it work. tried tweaking it a bit to no avail. 

I will upload the file with some more explanations

thanks!!!!

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors