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

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

Reply
Sunila
Helper I
Helper I

Power BI Toggle for outstanding balance

Hi everyone,

I'm currently working on implementing a toggle or selection pane(as shown) that allows users to view customers with outstanding balances in a data table.

Sunila_1-1713987534595.png

When the user selects "Yes," the table should display customer rows where the amount is not zero or blank.

The default selection is "No," which shows balances either zero or blank.

To achieve this, I've created a SWITCH function:

Selected Outstanding Balance =
SWITCH(
SELECTEDVALUE('OutstandingBal'[Condition]),
"No", [OS_Bal_No],
"Yes", [OS_Bal_Yes])

where 

OS_Bal_Yes = CALCULATE( [TotalBal],

FILTER( CustTrans,

NOT(ISBLANK([TotalBal])) && [TotalBal] <> 0 ) )

 

However, the OS_Bal_Yes measure is not filtering out rows with outstanding balances that are zero or blank as intended.

Could someone please assist me with resolving this issue?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sunila 

 

Please try the following Dax:

OS_Bal_Yes = 
CALCULATE(
    [TotalBal],
    FILTER(
        ALL('CustTrans'),  // Consider using ALL to remove filters if necessary
        NOT(ISBLANK('CustTrans'[TotalBal])) && 'CustTrans'[TotalBal] <> 0
    )
)
Selected Outstanding Balance =
SWITCH(
    SELECTEDVALUE('OutstandingBal'[Condition]),
    "No", [OS_Bal_No],
    "Yes", [OS_Bal_Yes]
)

 

 

 

 

 

Best Regards,

Jayleny

 

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 @Sunila 

 

Please try the following Dax:

OS_Bal_Yes = 
CALCULATE(
    [TotalBal],
    FILTER(
        ALL('CustTrans'),  // Consider using ALL to remove filters if necessary
        NOT(ISBLANK('CustTrans'[TotalBal])) && 'CustTrans'[TotalBal] <> 0
    )
)
Selected Outstanding Balance =
SWITCH(
    SELECTEDVALUE('OutstandingBal'[Condition]),
    "No", [OS_Bal_No],
    "Yes", [OS_Bal_Yes]
)

 

 

 

 

 

Best Regards,

Jayleny

 

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

Helpful resources

Announcements
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.