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

Filter one table from two filters

Hi All, 

 

jonathangsanto_0-1650883274610.png

I have two filters "Equipment1" and "Equipment2", I want it to show me only who has the "PlacaVeiculo" with the two information, like this:

 

jonathangsanto_1-1650883294018.png

What I tried to do:

I created a filter to ensure only the two were selected but it had no effect

confirmationTwoPoints =

VAR EquipBase = FILTERS(Dim_Equip1[Equipamento 1])
VAR EquipComp = FILTERS(Dim_Equip2[Equipamento 2])

return
CALCULATE( COUNT(BH_gold_base[PlacaVeiculo]),
FILTER(TabelaDistancias, TabelaDistancias[RadarBase]==EquipBase),
FILTER(TabelaDistancias, TabelaDistancias[RadarComparacao]==EquipComp))

 

Here is my table structure

jonathangsanto_2-1650883424282.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @jonathangsanto ;

You could try it.

Count = CALCULATE(COUNT([PlacaVeiculo]),FILTER('TabelaDistancias',[RadarBase]=MAX('Dim_Equip1'[Equipamento 1])||[RadarBase]=MAX('Dim_Equip2'[Equipamento 2])))

The final output is shown below:

vyalanwumsft_0-1651126548145.png

I can't completely reconstruct your model and what you want to output, if it's not correct, can you correct it or share a simple model?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yalanwu-msft
Community Support
Community Support

Hi, @jonathangsanto ;

You could try it.

Count = CALCULATE(COUNT([PlacaVeiculo]),FILTER('TabelaDistancias',[RadarBase]=MAX('Dim_Equip1'[Equipamento 1])||[RadarBase]=MAX('Dim_Equip2'[Equipamento 2])))

The final output is shown below:

vyalanwumsft_0-1651126548145.png

I can't completely reconstruct your model and what you want to output, if it's not correct, can you correct it or share a simple model?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

SpartaBI
Community Champion
Community Champion

@jonathangsanto 

Try this:
Step 1:
Make the bottom relationship inactive:

SpartaBI_0-1650886770596.png

Step 2:
Create this measure:

 

Show = 
INT(
    NOT ISEMPTY(
        INTERSECT(
            BH_gold_base,
            CALCULATETABLE(
                BH_gold_base,
                CROSSFILTER(BH_gold_base[ID_equip1],Dim_Equip1[ID_equip1],None),
                USERELATIONSHIP(BH_gold_base[ID_equip2],Dim_Equip2[ID_equip2])
            )
        )
    )
)

 


Step 3:
Put that measure in the visual level filter of the result matrix 
and choose there the 1:

SpartaBI_1-1650886999173.png

 

Is that what you meant?

the logic makes a lot of sense, but it still only filters by "Equipment 1", see:

 

jonathangsanto_0-1650890200087.png

 

The "PlacaVeiculo" BBD8249 is not on the list at 2200001

jonathangsanto_2-1650890386671.png

The "Placa veiculo" should only appear when both filters are true

 

@jonathangsanto 

Show = 
INT(
    NOT ISEMPTY(
        INTERSECT(
            VALUES(BH_gold_base[PlacaVeiculo]),
            CALCULATETABLE(
                VALUES(BH_gold_base[PlacaVeiculo]),
                CROSSFILTER(BH_gold_base[ID_equip1],Dim_Equip1[ID_equip1],None),
                USERELATIONSHIP(BH_gold_base[ID_equip2],Dim_Equip2[ID_equip2])
            )
        )
    )
)

 

 

did it work on your model? Because in mine it still only filters by the first 😕

 

 

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