Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Sum a column with multiple filters

Hi everybody,

I am trying to filter a column by another column. I am trying to make multiple filters by other column, in this case by account.

I want to SUM the following column: [AMOUNT]

I want to filter the column CxC_Partidas[Importe en moneda local] , by the accounts "4307000001" and "4300000001" (text format)

I tried to solve it trough many ways but I am not capable to find a solution that does this without creating two or more measures. 

Any idea?

Deuda = CALCULATE(SUM(CxC_Partidas[Importe en moneda local]),
FILTER( CxC_Partidas,CxC_Partidas[Cuenta]="4307000001" CxC_Partidas[Cuenta]="4300000001"))
 
Thanks in advice!!!
  • Hey Anonymous ,

     

    from your description this should be doable.

    Although the columns in the description and the ones in the measure are a little different.

     

    Try the following measure:

    Deuda =
    CALCULATE (
        SUM ( myTable[AMOUNT] ),
        FILTER ( CxC_Partidas, CxC_Partidas[Importe en moneda local] IN { "4307000001", "4300000001" } )
    )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     

1 Reply

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey Anonymous ,

     

    from your description this should be doable.

    Although the columns in the description and the ones in the measure are a little different.

     

    Try the following measure:

    Deuda =
    CALCULATE (
        SUM ( myTable[AMOUNT] ),
        FILTER ( CxC_Partidas, CxC_Partidas[Importe en moneda local] IN { "4307000001", "4300000001" } )
    )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis