Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Two dimension filters

Hello   How can I filter a table in two dimensions? I.e.: columns matching {A,B,C} AND rows matching COL1="10",COL2="20"   Thanks!
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    I created some data:

    dimensions1:

    dimensions2:

    Fact:

    Here are the steps you can follow:

    1. Create measure.

    Flag =
    IF(
        MAX('Fact'[Group]) in {"A","B","C"}&&MAX('Fact'[Col1])=10&&MAX('Fact'[Col2])=20,1,0)
    Sum_Measure =
        SUMX(FILTER(ALLSELECTED(dimensions1),'dimensions1'[Group]=MAX('Fact'[Group])),[Amount1])+
        SUMX(FILTER(ALLSELECTED(dimensions2),'dimensions2'[Col1]=MAX('Fact'[Col1])),[Amoun2])+
        SUMX(FILTER(ALLSELECTED(dimensions2),'dimensions2'[Col2]=MAX('Fact'[Col2])),[Amoun2])

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

    3. Result:

     

    If you need pbix, please click here.

    If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

     

    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