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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.