Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
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?
Solved! Go to Solution.
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.
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.