Forum Discussion
Inputs, Outputs and Differences
Hello everyone
I am making a balance scorecard, with entries and exits of the municipalities, and then the difference between the two.
For this I have a table with three fields: CT ISLAND, RESI ISLAND, Counter. This calculates me between the two communes of Municipalities how many it has. That is, each row is the result of MunicipalityCT to MunicipalityResi or vice versa, and it may be the case that it has different results for the same combination of municipalities:
The fact is that when I try to do the subtraction, the difference for a municipality between the two fields comes out to zero, since it only detects one of them and not both.
The measurements I use to calculate the entrances and exits are:
IslandsInputs=CALCULATE(
SUM('Consulta1'[num_contratos]);
Query1[ISLAND CT] = SELECTEDVALUE(Query1[ISLAND CT]);
'Consultation1'[CT ISLAND] <> 'Consultation1'[Residence ISLAND]
)
DeparturesIslands=
CALCULATE(
SUM('Consulta1'[num_contratos]);
Query1[RESIDENCE ISLAND] = SELECTEDVALUE(Query1[Residence ISLAND]);
'Consultation1'[Residence ISLAND] <> Consultation1[CT ISLAND]
)
I hope you can help me to see the light. Thank you very much in advance
- Anonymous1 year ago
Hi Syndicate_Admin ,
Maybe you should create table slicer about [ISLAND CT] and [Residence ISLAND]. You can refer to demo like below:
DeparturesIslands = CALCULATE( SUM('Consulta1'[num_contratos]), 'Consulta1'[RESIDENCE ISLAND] = SELECTEDVALUE('slicer'[RESIDENCE ISLAND]), 'Consulta1'[RESIDENCE ISLAND] <> 'Consulta1'[CT ISLAND] )IslandsInputs = CALCULATE( SUM('Consulta1'[num_contratos]), 'Consulta1'[CT ISLAND] = SELECTEDVALUE('slicer2'[CT ISLAND]), 'Consulta1'[CT ISLAND] <> 'Consulta1'[RESIDENCE ISLAND] )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi Syndicate_Admin ,
Maybe you should create table slicer about [ISLAND CT] and [Residence ISLAND]. You can refer to demo like below:
DeparturesIslands = CALCULATE( SUM('Consulta1'[num_contratos]), 'Consulta1'[RESIDENCE ISLAND] = SELECTEDVALUE('slicer'[RESIDENCE ISLAND]), 'Consulta1'[RESIDENCE ISLAND] <> 'Consulta1'[CT ISLAND] )IslandsInputs = CALCULATE( SUM('Consulta1'[num_contratos]), 'Consulta1'[CT ISLAND] = SELECTEDVALUE('slicer2'[CT ISLAND]), 'Consulta1'[CT ISLAND] <> 'Consulta1'[RESIDENCE ISLAND] )Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.