Forum Discussion

DavidAllen's avatar
DavidAllen
Regular Visitor
4 years ago
Solved

Filters used with Matrix Help

Could Someone help me with this challenge?
When setting the slicer to two of the selections ( BI developer and Data engineer ) I am still getting person 1014 as part of the table when this person has only one of these selections not both and I knew this is because the logic for slicer is OR not AND statement.
I thought the workaround will be to have the total skills part of the filter panel but the problem over there when I set the total skills is 2 then no data showing on my table!!!!

 

Table for sample data and snapshot for Power BI below.

Person IDSkillStateFirst NameLast Name
1011BI developer TXDavid Allen
1011Data engineer TXDavid Allen
1011Project Manager TXDavid Allen
1011Power Automate TXDavid Allen
1012BI developer WAJennAL
1012Data engineer WAJennAL
1013Solution architectTXJohnRandy
1013IT support TXJohnRandy
1013Full Stack developer TXJohnRandy
1014Data AnalyticsNYAnnaTom
1014Data engineer NYAnnaTom
1014Report DeveloperNYAnnaTom
1015BI developer WAMOHanna
1015Data engineer WAMOHanna
1015Solution architectWAMOHanna
1015IT support WAMOHanna
1015Full Stack developer WAMOHanna
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  DavidAllen ,

    Here are the steps you can follow:

    1. Create measure.

    Total Skills =
    COUNT('Table'[Skill])
    Count_Measure =
    CALCULATE(DISTINCTCOUNT('Table'[Skill]),ALLSELECTED('Table'))
    Flag =
    var _count=COUNTX(FILTER(ALLSELECTED('Table'),[Person ID]=MAX('Table'[Person ID])),[Skill])
    return
    iF(_count =[Count_Measure],1,0)

    2. Place [Flag] in Filters, set is=1, apply filter.

    3. Result:

    After selection, 1014 is filtered out

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  DavidAllen ,

    Here are the steps you can follow:

    1. Create measure.

    Total Skills =
    COUNT('Table'[Skill])
    Count_Measure =
    CALCULATE(DISTINCTCOUNT('Table'[Skill]),ALLSELECTED('Table'))
    Flag =
    var _count=COUNTX(FILTER(ALLSELECTED('Table'),[Person ID]=MAX('Table'[Person ID])),[Skill])
    return
    iF(_count =[Count_Measure],1,0)

    2. Place [Flag] in Filters, set is=1, apply filter.

    3. Result:

    After selection, 1014 is filtered out

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • DavidAllen , Try a measure like

     

    measure =
    var _cnt = countx(allselected(Fact_personalSkill), Fact_personalSkill[Skill])
    return
    sumx(filter(summarize(Fact_personalSkill, dim_person[person id], "_1", [Total Skills]), [_1] =_cnt) ,[_1])