The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |