Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to 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?
How do you expect Management Levels to affect the calculation?
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?
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
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
Proud to be a Datanaut!
so, i am trying to not get a boolean output, when i use the measure below, i get the values that i want:
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
Proud to be a Datanaut!
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
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |