Forum Discussion

henrydhs's avatar
henrydhs
Frequent Visitor
2 years ago
Solved

Automatically filter 3 fields at the same time

Dear colleagues,

I have a question and I'm not sure how to solve it. I have two tables and I want one to filter 3 fields at the same time automatically in table 2. The problem is that it only allows one relationship at a time.

I leave the following example in case you can help me.

 

Table 1

Table 2

 

 

Relationship

When putting Active there another relationship appears this problem

 

I tried to use this Dax formula but doesn't work. I think because doesn't have a relationship 

 

Thank you

 

 

 

  • you can either create a composite key that concatenates these three fields. or your can use disconnected tables and TREATAS based measures to filter your second table.

  • Thank you very much. It´s more easy than I thought, I creat that concatenate relationship. Thank you 

3 Replies

  • you can either create a composite key that concatenates these three fields. or your can use disconnected tables and TREATAS based measures to filter your second table.

    • henrydhs's avatar
      henrydhs
      Frequent Visitor

      Thank you very much. It´s more easy than I thought, I creat that concatenate relationship. Thank you 

  • henrydhs's avatar
    henrydhs
    Frequent Visitor

    Hello everyone,

    After creating the concatenate function, I now have a problem selecting the PDCA table with the PDCA filter. The percentage calculation formula does not work correctly. Below is an example:

    ```DAX
    ColunaFiltragem Append L1 L2 = 'Append L1 L2'[Description Piece type] & " - " & 'Append L1 L2'[Descrição Defeito] & "-" & 'Append L1 L2'[Model]

    The calculation formula is:
    ```DAX
    PDCA 3% = DIVIDE([Reprocesso 1o Fogo], [Entrd. EF 1o Fogo Fixo Geral], 0)

    Example 1:
    When the PDCA table is filtered:

     

    DAX
    Entrd. EF 1o Fogo PDCA = CALCULATE(SUM('Append L1 L2'[Entrd. EF 1o Fogo Coluna]))

     

     

     Example 2:
    I tried with the `CALCULATE` and `ALL` formula, but there is no filtering:

     

     

    DAX
    Entrd. EF 1o Fogo PDCA = CALCULATE(SUM('Append L1 L2'[Entrd. EF 1o Fogo Coluna]), ALL('Append L1 L2'[ColunaFiltragem Append L1 L2]))

     

    The correct value would be:

     

    The problem seems to be with the filtering of the formula `Entrd. EF 1o Fogo PDCA`, but I don't know how to solve the issue to perform the calculation correctly.