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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
mmills2018
Helper IV
Helper IV

ISFILTERED returning true value

Hello, I am using ISFILTERED in a calculation but it keeps returning true and not the actual values, any ideas why? below is my measure i am using

 

 

IF(ISFILTERED('Mgmt Levels'[Management Levels]),
ISINSCOPE( Goals[Group]),SELECTEDVALUE(Goals[2021 Female Goal]))||if(ISINSCOPE(Goals[Platform]),CALCULATE(sum(Goals[2021 Female Goal]),Goals[IsPlatform]=1))
1 ACCEPTED SOLUTION

OMG, that worked! THANK YOU!  One more question, if nothing in the filter is selected is there a way to set it to default to a certain number?

View solution in original post

12 REPLIES 12
AlexisOlson
Super User
Super User

How do you expect Management Levels to affect the calculation?

So, the below calcuation is actually working for me .  I have it set to filter on a specific value in my management level filter (M1-M3).  the issue with this measure is, i don't want to only filter on M1-M3, I want to filter on other values, any ideas?
 
var filtered = FILTER ('Goals',Goals[Mgmt Levels]= "M1-M3")
VAR _goal = SUMX(FILTER (filtered,[Mgmt Levels] in VALUES (Goals[Mgmt Levels])),IF(
ISINSCOPE( Goals[Group]),(Goals[2021 Female Goal]),if(ISINSCOPE(Goals[Platform]),CALCULATE(sum(Goals[2021 Female Goal]),Goals[IsPlatform]=1))))
return
_goal

Does this work?

SUMX (
    'Goals',
    IF (
        ISINSCOPE ( Goals[Group] ),
         ( Goals[2021 Female Goal] ),
        IF (
            ISINSCOPE ( Goals[Platform] ),
            CALCULATE ( SUM ( Goals[2021 Female Goal] ), Goals[IsPlatform] = 1 )
        )
    )
)

Assuming this is a measure, the Goals table will be filtered by whatever you set your Mgmt Levels to be.

unfortunately, it doesnt work.  I want my snapshot table to filter and not my goals table.  I still need to somehow connect the management level from my goals able to the management level from my snapshot data?

Sorry. I'm just shooting in the dark here since I still can't quite tell what's going on and what you're trying to do.

 

What if you replace the 'Goals' table argument from my suggestion with the following?

FILTER ( 'Goals', Goals[Mgmt Levels] IN VALUES ( 'Mgmt Levels'[Management Levels] ) )

 

If that doesn't work, I'd suggest trying to rewrite your question so that other people can understand it better.

OMG, that worked! THANK YOU!  One more question, if nothing in the filter is selected is there a way to set it to default to a certain number?

Anonymous
Not applicable

Hi @mmills2018,

Perhaps you can try to use 'if statement' to package and switch between two different conditions:

FILTER (
    'Goals',
    IF (
        COUNTROWS ( VALUES ( 'Mgmt Levels'[Management Levels] ) ) > 0,
        Goals[Mgmt Levels] IN VALUES ( 'Mgmt Levels'[Management Levels] ),
        Goals[Mgmt Levels] = "default value"
    )
)

Regards,
Xiaoxin Sheng

BA_Pete
Super User
Super User

Hi @mmills2018 ,

 

If your first IF condition resolves to TRUE i.e. 'Mgmt Levels'[Management Levels] is filtered, then your output will be ISINSCOPE(...).

ISINSCOPE gives a boolean output, which is where I would guess your boolean measure result is coming from.

IF(
  ISFILTERED('Mgmt Levels'[Management Levels]),
  ISINSCOPE( Goals[Group]),     //This function gives Boolean output when first condition is TRUE
  SELECTEDVALUE(Goals[2021 Female Goal])
)
||
IF(
  ISINSCOPE(Goals[Platform]),
  CALCULATE(
    SUM(Goals[2021 Female Goal]),
    Goals[IsPlatform]=1
  )
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




So, the below calcuation is actually working for me .  I have it set to filter on a specific value in my management level filter (M1-M3).  the issue with this measure is, i don't want to only filter on M1-M3, I want to filter on other values, any ideas?
 
var filtered = FILTER ('Goals',Goals[Mgmt Levels]= "M1-M3")
VAR _goal = SUMX(FILTER (filtered,[Mgmt Levels] in VALUES (Goals[Mgmt Levels])),IF(
ISINSCOPE( Goals[Group]),(Goals[2021 Female Goal]),if(ISINSCOPE(Goals[Platform]),CALCULATE(sum(Goals[2021 Female Goal]),Goals[IsPlatform]=1))))
return
_goal

so, i am trying to not get a boolean output, when i use the measure below, i get the values that i want:

IF(
ISINSCOPE( Goals[Group]),SELECTEDVALUE(Goals[2021 Female Goal]),if(ISINSCOPE(Goals[Platform]),CALCULATE(sum(Goals[2021 Female Goal]),Goals[IsPlatform]=1)))
 
I am trying to add a slicer to this measure from an unrelated table. any ideas how i can do this without getting a boolean output?

@mmills2018 ,

 

I'm not entirely sure what you mean by "add a slicer...from an unrelated table".

 

It's very difficult for me to know what you need without seeing your data/data model and without knowing what this measure is supposed to do or what your desired output looks like.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




@mmills2018 ,

 

I think I understand what you're getting at here now.

 

Have you tried just amending your first condition to include the requirement for your [Mgmt Levels] field to be filtered? Something like this:

IF(
  ISINSCOPE( Goals[Group]) && ISFILTERED('Mgmt Levels'[Management Levels]),
  SELECTEDVALUE(Goals[2021 Female Goal]),
  IF(
    ISINSCOPE(Goals[Platform]),
    CALCULATE(
      sum(Goals[2021 Female Goal]),
      Goals[IsPlatform]=1
    )
  )
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors