Forum Discussion
Create Supplemental Value Table
- 5 years ago
I suggest you eliminate the many-to-many relationship between your Servicios_habilitados (Nombre_municipio) and CONTRACTED SERVICES (MUNICIPIO).
Instead, create a Dimension table for unique "municipalities" values and create one-to-many relationships between this Dimension table and Servicios_habilitados (Nombre_municipio) and CONTRACTED SERVICES (MUNICIPIO).
To identify services that have not been contracted to us:
Services not contracted ?
VAR CONtServices - VALUES(SERVICIOS_CONTRATADOS [COD_SERVICIO]
VAR ServObl - VALUES(SERVICIOS_TRAZADORES[COD SERVICE]
ReturnCOUNTROWS(EXCEPT(ServObl, ContServices)
- 5 years ago
Hello @JuanDtM23 ,
Depending on my understanding of your description, you can create a measure for the visual level filter:
Measure = var a =CALCULATETABLE(EXCEPT(VALUES(Servicios_habilitados[serv_codigo]),VALUES('SERVICIOS CONTRATADOS'[COD_SERVICIO]))) return IF(MAX(Servicios_Trazadores_Habilitados[COD])in a,1,0)Add it to Services Plotters Enabled table visual level filter and set it to 1:
If this post helps, then consider Accept it as the solution to help other members find it faster.
Best regards
Dedmon Dai
Hi JuanDtM23 ,
Is there any column to distinguish between municipalities and ordinary cities? Or you can create a measure for it and add it to visual level filter on the right table.
It is difficult to understand your requirements only through your description, perhaps you can provide some sample data.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
- JuanDtM235 years agoHelper II
Hello @v-deddai1-msft ,
No, the Contracted Services table has a column called "Municipality" which contains both ordinary cities and municipalities, for its part the table "Servicios_Habilitados" has a column called "Nombre_Municipio_" which also contains ordinary cities and municipalities.
I attach the . Pbix for greater understanding: