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
Oopa
Frequent Visitor

Calculate first day when value is greater than start value

Hi,

 

I try to generate measure which should return first date where cumulative amount is greater than start value. I did measure 

First_date = CALCULATE(FIRSTDATE(Cumulative_amount[Date]);FILTER(Cumulative_amount;Cumulative_amount[Cumulative_amount]>Start_amount[Start_value_amount])) but this gives the results below which are not correct. E.g for date 2.1.2020 I would like to see 17.1.2020 etc.
 
Example_snip.JPG



 
 
1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Oopa ,

 

We should create a measure as below to work on it.

Measure = 
IF (
    SUM ( Start_amount[Start_value_amount] ) = BLANK (),
    BLANK (),
    CALCULATE (
        MIN ( 'Cumulative_amount'[date] ),
        FILTER (
            ALL ( Cumulative_amount ),
            Cumulative_amount[Cumulative_amount] > SUM ( Start_amount[Start_value_amount] )
        )
    )
)

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Oopa ,

 

We should create a measure as below to work on it.

Measure = 
IF (
    SUM ( Start_amount[Start_value_amount] ) = BLANK (),
    BLANK (),
    CALCULATE (
        MIN ( 'Cumulative_amount'[date] ),
        FILTER (
            ALL ( Cumulative_amount ),
            Cumulative_amount[Cumulative_amount] > SUM ( Start_amount[Start_value_amount] )
        )
    )
)

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thank you very much it works perfectly!

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.