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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Based on multiple if condition then it should sum the two values.

versiononboarding planapp idNo of FeedsOUTPUTModified 
4A_0002XYZ2122/1/2024 
3A_0002XYZ2 10/1/2023 
2A_0003XYZ20 3/5/2024 
1A_0003XYZ10122/1/2024 

 

For every record in the file
for each onboarding for this application
{if there are any other onboardings for the same application with modified
date less than or equal to the current onboarding version's modified date
(MDC)
THEN add the feed count of the max(modified date) FCO from that set with
current onboarding version's feed count FCC
end-if
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous

 

You seem to want to calculate the "feed" sum based on the maximum modification date that is less than the modification date of the current version.

 

For your question, here is the method I provided:

 

Create measures.

 

Query the maximum modification date that is less than the modification date of the current version.

max modified date = var _max = CALCULATE(MAX('Table'[Modified]), FILTER(ALL('Table'), 'Table'[onboarding plan] = MAX('Table'[onboarding plan])))
RETURN CALCULATE(
    MAX('Table'[Modified]), 
    FILTER(
        ALL('Table'), 
        'Table'[onboarding plan] = MAX('Table'[onboarding plan]) 
        && 
        'Table'[Modified] < _max
        ))

 

 

Calculate the sum.

OUT PUT = 
CALCULATE(
    SUM('Table'[No of Feeds]), 
    FILTER(
        ALL('Table'), 
        'Table'[Modified] = [max modified date]
    )
)

 

 

Here is the result.

 

vnuocmsft_0-1710299523818.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous

 

You seem to want to calculate the "feed" sum based on the maximum modification date that is less than the modification date of the current version.

 

For your question, here is the method I provided:

 

Create measures.

 

Query the maximum modification date that is less than the modification date of the current version.

max modified date = var _max = CALCULATE(MAX('Table'[Modified]), FILTER(ALL('Table'), 'Table'[onboarding plan] = MAX('Table'[onboarding plan])))
RETURN CALCULATE(
    MAX('Table'[Modified]), 
    FILTER(
        ALL('Table'), 
        'Table'[onboarding plan] = MAX('Table'[onboarding plan]) 
        && 
        'Table'[Modified] < _max
        ))

 

 

Calculate the sum.

OUT PUT = 
CALCULATE(
    SUM('Table'[No of Feeds]), 
    FILTER(
        ALL('Table'), 
        'Table'[Modified] = [max modified date]
    )
)

 

 

Here is the result.

 

vnuocmsft_0-1710299523818.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors