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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
dashmarley11
Helper III
Helper III

Report Builder Nested If

I need to build a nested "If" Sum calculation that follows this logic:

If PrevFtp2 =0 THEN 0

If CurrFtp2 =0 THEN PrevFtp2/PrevBook2

Else PrevFtp1/PrevBook1 - PrevFtp2/PrevBook2

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

Thankyou, @ajohnso2@techies, for your response.

Hi @dashmarley11,

We appreciate your inquiry posted on the Microsoft Fabric Community Forum.

Further to the response provided by @techies , please find attached the screenshot and the PBIX file, which may assist in resolving the issue:

vpnarojumsft_0-1745574260101.png

If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will help other community members facing similar queries.

Thank you.

View solution in original post

6 REPLIES 6
v-pnaroju-msft
Community Support
Community Support

Hi dashmarley11,

We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.

If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi dashmarley11,

We wanted to check in regarding your query, as we have not heard back from you. If you have resolved the issue, sharing the solution with the community would be greatly appreciated and could help others encountering similar challenges.

If you found our response useful, kindly mark it as the accepted solution and provide kudos to guide other members.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi dashmarley11,

We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you have identified a solution, we kindly request you to share it with the community, as it may be helpful to others facing a similar issue.

If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Thankyou, @ajohnso2@techies, for your response.

Hi @dashmarley11,

We appreciate your inquiry posted on the Microsoft Fabric Community Forum.

Further to the response provided by @techies , please find attached the screenshot and the PBIX file, which may assist in resolving the issue:

vpnarojumsft_0-1745574260101.png

If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will help other community members facing similar queries.

Thank you.

techies
Super User
Super User

Hi @dashmarley11 please check this

 

nested if example =
SUMX (
    Data,
    VAR _PrevFtp2 = Data[PrevFtp2]
    VAR _CurrFtp2 = Data[CurrFtp2]
    VAR _PrevFtp1 = Data[PrevFtp1]
    VAR _PrevBook1 = Data[PrevBook1]
    VAR _PrevBook2 = Data[PrevBook2]

    RETURN
        IF (
            _PrevFtp2 = 0,
            0,
            IF (
                _CurrFtp2 = 0,
                DIVIDE(_PrevFtp2, _PrevBook2),
                DIVIDE(_PrevFtp1, _PrevBook1) - DIVIDE(_PrevFtp2, _PrevBook2)
            )
        )
)
Power BI & Microsoft Fabric
PL-300 | DP-600 | DP-700 Certified
ajohnso2
Solution Supplier
Solution Supplier

if(PrevFtp2 = 0, 0, if(CurrFtp2 = 0, PrevFtp2/PrevBook2, PrevFtp1/PrevBook1 - PrevFtp2/PrevBook2))

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.