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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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