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

Formula stops working when filters are applied

Hello guys,

 

I don't understand why my formula stops being correct when filters are applied to my page.

Here is my formula:

Calcul Ratio Revenue =
if( OR(
        CONTAINS(Powerbi,Powerbi[Chart of Account V2],"ER"),
        CONTAINS(Powerbi,Powerbi[Chart of Account V2],"IR")
    ), "",
DIVIDE(
    CALCULATE(SUM(Powerbi[Amount Allocated]))
        ,
    CALCULATE(
            SUM(Powerbi[Amount Allocated]),
            ALLEXCEPT(powerbi, Powerbi[Product_9]),
            Powerbi[P&L indicator] = "Total Revenue"
        )
    ))
Maybe i have to add some code in it ?
Thanks in advance,
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 
Please try to change this pasrt of the code

CALCULATE (
    SUM ( Powerbi[Amount Allocated] ),
    ALLSELECTED ( powerbi ),
    VALUES ( Powerbi[Product_9] ),
    Powerbi[P&L indicator] = "Total Revenue"
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 
Please try to change this pasrt of the code

CALCULATE (
    SUM ( Powerbi[Amount Allocated] ),
    ALLSELECTED ( powerbi ),
    VALUES ( Powerbi[Product_9] ),
    Powerbi[P&L indicator] = "Total Revenue"
)

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.