Forum Discussion
Filter one table from two filters
Hi All,
I have two filters "Equipment1" and "Equipment2", I want it to show me only who has the "PlacaVeiculo" with the two information, like this:
What I tried to do:
I created a filter to ensure only the two were selected but it had no effect
Here is my table structure
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:
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.
5 Replies
- SpartaBI
Community Champion
Try this:
Step 1:
Make the bottom relationship inactive: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:Is that what you meant?
- jonathangsanto
Helper I
the logic makes a lot of sense, but it still only filters by "Equipment 1", see:
The "PlacaVeiculo" BBD8249 is not on the list at 2200001
The "Placa veiculo" should only appear when both filters are true
- SpartaBI
Community Champion
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]) ) ) ) )
- v-yalanwu-msft
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:
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.