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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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 | Blog: medium.com/@cseprs_54978
ajohnso2
Super User
Super User

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

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors