Forum Discussion

DJSwezey's avatar
DJSwezey
Helper I
2 years ago
Solved

Measure breaks matrix when page filtered by multiple values

I am building a profit/margin dashboard for multiple clients. I am referencing one table for all of this; 'Budgets'. I have a separate page for each client and each page is filtered by the client c...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi DJSwezey 

    You can try the following measure.

    Earned =
    VAR Earned_Overall =
        [Billing]
            - IF (
                [Delivery%] >= [Guarantee%],
                0,
                ( [Guarantee%] - [Delivery%] ) * [Billing]
            )
    VAR Earned_Market =
        SUMX (
            SUMMARIZE ( Budgets, Budgets[BuyspecName], Budgets[Market], "Value", [ECalc] ),
            [Value]
        )
    RETURN
        SWITCH (
            TRUE (),
            SELECTEDVALUE ( Budgets[cclient2] ) = "H1"
                || SELECTEDVALUE ( Budgets[cclient2] ) = "M1", IF ( NOT ( ISINSCOPE ( Budgets[BuyspecName] ) ), Earned_Overall ),
            Earned_Market
        )
    

    Best Regards!

    Yolo Zhu

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