Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
54 | |
27 | |
23 | |
14 | |
11 |
User | Count |
---|---|
77 | |
63 | |
44 | |
17 | |
12 |