Hola, espero me puedan ayudar.
tengo dos tablas, la TABLA_A tiene los campos de (id_region, Regiรณn, Ciudad), la segunda TABLA_B tiene los campos(id_clave,id_region,actividad,fecha), el caso es que quiero contar cuantas ciudades รบnicas fueron visitadas en cada actividad), tengo la siguiente formula
Solved! Go to Solution.
If you have an active 1-many relationship betwee Table_A[idregion] and Table_B[idregion] this should work too, although I'd need some sample data to do a quick check
Total Ciudad =
CALCULATE ( DISTINCTCOUNT ( Tabla_A[Ciudad] ), Tabla_B )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @Glenan
It would help if you show a sample of the tables in your model and their relationships (active and inactive). Try this:
1. Place Tabla_B[Actividad] in a table visual
2. Update the measure and place it in the visual:
Total Ciudad =
CALCULATE (
DISTINCTCOUNT ( Tabla_A[Ciudad] ),
FILTER ( Tabla_A, Tabla_A[id_region] = SELECTEDVALUE ( Tabla_B[id_region] ) )
)
If this does not work please show a sample of your tables
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
If you have an active 1-many relationship betwee Table_A[idregion] and Table_B[idregion] this should work too, although I'd need some sample data to do a quick check
Total Ciudad =
CALCULATE ( DISTINCTCOUNT ( Tabla_A[Ciudad] ), Tabla_B )
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thanks!!, the best solution it's the most simple
User | Count |
---|---|
41 | |
25 | |
13 | |
9 | |
8 |
User | Count |
---|---|
37 | |
22 | |
16 | |
14 | |
12 |