Forum Discussion

khhank10's avatar
khhank10
Regular Visitor
3 years ago
Solved

Calculate with multiple filters.

I need to calculate the operating cost, lets say codes 900, 901 and 907, i am wondering if there is a way that i can only reference the table and column once and input all the code that i need istead of doing one by one like this example below and ading at the end:

CALCULATE(SUM(Sheet1[Value]), Sheet1[Codigo]=900)

then CALCULATE(SUM(Sheet1[Value]), Sheet1[Codigo]=901)

then CALCULATE(SUM(Sheet1[Value]), Sheet1[Codigo]=907)...

or even, Total cost = CALCULATE(SUM(Sheet1[Value]), Sheet1[Codigo]=900,Sheet1[Codigo]=901,Sheet1[Codigo]=907)

 

Pardon the ignorance and much apreciated for the help.

 

 

DescriçãoCodigoDescrição Conta RedusidaContontábilDescriçãoValue
900 TTL Property Cost900900 TTL Custo da Propriedade+.9.4903.3.5.01.02Rent and occupational rate               54.585,89
900 TTL Property Cost900900 TTL Custo da Propriedade+.9.9703.4.1.05.50Rental and condominium fee               13.595,11
900 TTL Property Cost900900 TTL Custo da Propriedade+.10.3303.4.1.05.17Maintenance and building repairs                    757,31
900 TTL Property Cost900900 TTL Custo da Propriedade+.54.8703.4.1.05.60Aluguel e Taxa Condominial - IFRS 16-              34.032,83
900 TTL Property Cost900900 TTL Custo da Propriedade..900TTL Property Cost           34.905,47
901 TTL Insurance & Damages901901 TTL Seguros e Danos+.9.2103.3.2.01.05Insurance               14.551,68
901 TTL Insurance & Damages901901 TTL Seguros e Danos+.10.0803.4.1.05.68Insurance                    395,58
901 TTL Insurance & Damages901901 TTL Seguros e Danos..901TTL Insurance & Damages           14.947,25
907 TTL Licenses/Permits907907 TTL Licenças/Permissões+.10.3003.4.1.05.14Taxes and fees                 2.127,13
907 TTL Licenses/Permits907907 TTL Licenças/Permissões+.10.5003.4.1.05.72IPTU                 8.684,66
907 TTL Licenses/Permits907907 TTL Licenças/Permissões+.10.5303.4.1.05.75Municipal and state fees                 1.723,43
907 TTL Licenses/Permits907907 TTL Licenças/Permissões..907TTL Licenses/Permits           12.535,22
922 Basic Salaries and Holiday922922 Salários Básicos e Férias+.9.1703.3.2.01.01Fuel and lubricants                    225,66
922 Basic Salaries and Holiday922922 Salários Básicos e Férias+.9.2003.3.2.01.04Parts and replacements                 4.873,21
922 Basic Salaries and Holiday922922 Salários Básicos e Férias+.9.4503.3.4.01.03third-party services-              13.007,83
922 Basic Salaries and Holiday922922 Salários Básicos e Férias+.9.9903.4.1.05.52Maintenance and repairs                    143,18
922 Basic Salaries and Holiday922922 Salários Básicos e Férias+.10.1903.4.1.05.03Fuels and lubricants                 1.133,81
922 Basic Salaries and Holiday922922 Salários Básicos e Férias+.10.3403.4.1.05.18Auxiliary materials and consumables                 4.683,34

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi khhank10 ,

    You can create a measure as below to get it, please find the details in the attachment.

    Measure = CALCULATE ( SUM ( Sheet1[Value] ), Sheet1[Codigo] IN { 900, 901, 907 } )

    Best Regards