Forum Discussion

mmills2018's avatar
mmills2018
Icon for Helper IV rankHelper IV
5 years ago

Getting Slicer/Filter to work

Hello,

I have the below calculation for a filter.  The issue I am running into, is that PoC only works when Gender is filter.  I would like the filter for POC to ALSO work without needing to filter by Gender first.  So POC filter would function when gender is filter and would function when gender is not not selected. any ideas?
 
 
VAR cta_add =
//cta with additional filter
SUMX (
FILTER (
filtered,
[Gender]
IN VALUES ( Gender[Gender] )
&& IF (
ISFILTERED ( PoC ),
[Race/Ethnicity] IN VALUES ( PoC[PoC (USA Only)] ),
TRUE ()
)
),
[Count Total Associates (PME)]
)
 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Is it possible for you to share the pbix file ?

  • unfortunately, I can't.  i was hoping there would be a way to create an if/or statement for Gender and POC, POC has an if statement but Gender does not....

    • Anonymous's avatar
      Anonymous
      Not applicable

      You can use nested If statement to give multiple conditions. Check the third example here

      This seems to be an easy issue but I am not able to understand what is required. Some more details might help.

  • Anonymous's avatar
    Anonymous
    Not applicable

    mmills2018 

     

    We cannot detect problem without see your model, maybe a sample  pbix without sensitive data?

     

    If tables are related together, you should able just use those filters on [Count Total Associates (PME)] measure, additional formula is not necessary.

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.