Forum Discussion
ISFILTERED not working with manual selection
- 2 years ago
Hi Julia2023
Assuming it is the Data source field that is causing problems I would replace both of them.
Budget =
VAR isSalesblank =
IF(
ISFILTERED(Country[Country]) ||
Count('Data Source'[Data Source]) <> CountRows(All('Data Source')) ||
ISFILTERED('NumberISO'[NumberKey]) ||
ISFILTERED('Customer'[Customer]) ||
ISFILTERED('Name' [Name]) ||
ISFILTERED('Customers Clasification'[Classification]),
BLANK(),
[Budget] -- if none of the filters are applied
)
VAR isnotSalesblank =
IF(
ISFILTERED(Country[Country]) ||
Count('Data Source'[Data Source]) <> CountRows(All('Data Source')) ||
ISFILTERED('NumberISO'[NumberKey]) ||
ISFILTERED('Customer'[Customer]) ||
ISFILTERED('Name' [Name]) ||
ISFILTERED('Customers Clasification'[Classification]),
"Value is not available at this level",
[Budget for CY]
)
RETURN
IF(
ISBLANK([POS $]),
isSalesblank,
isnotSalesblank
)
- Anonymous2 years ago
Hi Julia2023 ,
I’d like to acknowledge the valuable input provided by the SamWiseOwl . Their initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue.
According to the design of Power BI, when you select "select all", all data is displayed, the same logic as when there is no filter.
When you select values individually, the filter uses the logic of OR to filter the values.
Because of this, it causes unexpected results. You can distinguish the selected results by counting as SamWiseOwl said.
Measure = COUNT('Data Source'[Data Source]) Measure 2 = CALCULATE(COUNT('Data Source'[Data Source]),ALL('Data Source'))If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, SamWiseOwl . Where do you think this condition should be placed in my measure? Thanks.
Budget =
VAR isSalesblank =
IF(
ISFILTERED(Country[Country]) ||
ISFILTERED('Data Source'[Data Source]) ||
ISFILTERED('NumberISO'[NumberKey]) ||
ISFILTERED('Customer'[Customer]) ||
ISFILTERED('Name' [Name]) ||
ISFILTERED('Customers Clasification'[Classification]),
BLANK(),
[Budget] -- if none of the filters are applied
)
VAR isnotSalesblank =
IF(
ISFILTERED(Country[Country]) ||
ISFILTERED('Data Source'[Data Source]) ||
ISFILTERED('NumberISO'[NumberKey]) ||
ISFILTERED('Customer'[Customer]) ||
ISFILTERED('Name' [Name]) ||
ISFILTERED('Customers Clasification'[Classification]),
"Value is not available at this level",
[Budget for CY]
)
RETURN
IF(
ISBLANK([POS $]),
isSalesblank,
isnotSalesblank
)