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
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.
User | Count |
---|---|
45 | |
13 | |
11 | |
10 | |
10 |
User | Count |
---|---|
39 | |
26 | |
18 | |
13 | |
12 |