Forum Discussion
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ção | Codigo | Descrição | Conta Redusida | Contontábil | Descrição | Value | |
| 900 TTL Property Cost | 900 | 900 TTL Custo da Propriedade | + | .9.490 | 3.3.5.01.02 | Rent and occupational rate | 54.585,89 |
| 900 TTL Property Cost | 900 | 900 TTL Custo da Propriedade | + | .9.970 | 3.4.1.05.50 | Rental and condominium fee | 13.595,11 |
| 900 TTL Property Cost | 900 | 900 TTL Custo da Propriedade | + | .10.330 | 3.4.1.05.17 | Maintenance and building repairs | 757,31 |
| 900 TTL Property Cost | 900 | 900 TTL Custo da Propriedade | + | .54.870 | 3.4.1.05.60 | Aluguel e Taxa Condominial - IFRS 16 | - 34.032,83 |
| 900 TTL Property Cost | 900 | 900 TTL Custo da Propriedade | ..900 | TTL Property Cost | 34.905,47 | ||
| 901 TTL Insurance & Damages | 901 | 901 TTL Seguros e Danos | + | .9.210 | 3.3.2.01.05 | Insurance | 14.551,68 |
| 901 TTL Insurance & Damages | 901 | 901 TTL Seguros e Danos | + | .10.080 | 3.4.1.05.68 | Insurance | 395,58 |
| 901 TTL Insurance & Damages | 901 | 901 TTL Seguros e Danos | ..901 | TTL Insurance & Damages | 14.947,25 | ||
| 907 TTL Licenses/Permits | 907 | 907 TTL Licenças/Permissões | + | .10.300 | 3.4.1.05.14 | Taxes and fees | 2.127,13 |
| 907 TTL Licenses/Permits | 907 | 907 TTL Licenças/Permissões | + | .10.500 | 3.4.1.05.72 | IPTU | 8.684,66 |
| 907 TTL Licenses/Permits | 907 | 907 TTL Licenças/Permissões | + | .10.530 | 3.4.1.05.75 | Municipal and state fees | 1.723,43 |
| 907 TTL Licenses/Permits | 907 | 907 TTL Licenças/Permissões | ..907 | TTL Licenses/Permits | 12.535,22 | ||
| 922 Basic Salaries and Holiday | 922 | 922 Salários Básicos e Férias | + | .9.170 | 3.3.2.01.01 | Fuel and lubricants | 225,66 |
| 922 Basic Salaries and Holiday | 922 | 922 Salários Básicos e Férias | + | .9.200 | 3.3.2.01.04 | Parts and replacements | 4.873,21 |
| 922 Basic Salaries and Holiday | 922 | 922 Salários Básicos e Férias | + | .9.450 | 3.3.4.01.03 | third-party services | - 13.007,83 |
| 922 Basic Salaries and Holiday | 922 | 922 Salários Básicos e Férias | + | .9.990 | 3.4.1.05.52 | Maintenance and repairs | 143,18 |
| 922 Basic Salaries and Holiday | 922 | 922 Salários Básicos e Férias | + | .10.190 | 3.4.1.05.03 | Fuels and lubricants | 1.133,81 |
| 922 Basic Salaries and Holiday | 922 | 922 Salários Básicos e Férias | + | .10.340 | 3.4.1.05.18 | Auxiliary materials and consumables | 4.683,34 |
- Anonymous3 years ago
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
1 Reply
- AnonymousNot 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