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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.