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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JohanData
Resolver I
Resolver I

Cumulative Values between Period of Time

Hi there,

 

Could you please help me out?

Link to the files: https://1drv.ms/u/s!AvDjQoL_zmjliHROT3e-Y6s2FSmD?e=fFX1lc

 

Situation:

PBI Community 20191203.JPG

 

This should be the outcome:

PBI Community 20191203_2.JPG

 

Thanks in advance..!

1 ACCEPTED SOLUTION

@JohanData 

I see your expected solution. It seems that is impossible to make the table exactly same as your expected outcome. You cannot have blank in the datesigned and maxenddate like your expected outcome with the features in Power BI Desktop.

Best regards,
Paul 

 

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@JohanData 

I created SpendCum and Project results columns in the fact table in my solution. Since you are including columns from two tables in Power bi, you cannot leave blanks and make the table exact same as your expected outcomes.

SpendingCum = 
CALCULATE (
    SUM ( 'Fact'[SpentAmount] ),
    FILTER (
       ALLEXCEPT('Fact','Dimension'[ParentProjectNr]),
        [Date] <= EARLIER ( 'Fact'[Date] )
),
    'Fact'[Date] >= RELATED ( 'Dimension'[DateSigned] ),
    'Fact'[Date] <= RELATED ( 'Dimension'[MaxDateEndProject] )
)
Project result = 
CALCULATE (
    SUM ( 'Dimension'[Price] ) - LASTNONBLANK ( 'Fact'[SpendingCum], "" ),
    FILTER ( 'Fact', LASTDATE ( 'Date'[Date] ) )
)

soluation.JPG

Here is the pbix if needed: https://qiuyunus-my.sharepoint.com/:u:/g/personal/paul_qiuyunus_onmicrosoft_com/EdXN14MBisFInuK7Lr2L... 

Best,
Paul

@V-pazhen-msft thanks!

 

Unfortunately, this is not what I'm looking for. I reshaped my files. This should be the outcome (screenshot +attached files):

Link: https://1drv.ms/u/s!AvDjQoL_zmjliQLeHwlgFVgk6kvD?e=LRAd5i

 

PBI Community 20191211.JPG

@JohanData 

I see your expected solution. It seems that is impossible to make the table exactly same as your expected outcome. You cannot have blank in the datesigned and maxenddate like your expected outcome with the features in Power BI Desktop.

Best regards,
Paul 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.