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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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