Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Tengo una cortadora del mes de columna y cuando selecciono los tres meses (1,2,3) me gustaría mostrarme los clientes que están presentes en los 3 meses
en este ejemplo sería 1 (cliente g)
¿es posible?
Mes | Grupo | Cliente |
1 | a | g |
2 | b | g |
3 | c | g |
1 | a | a |
2 | b | b |
1 | a | b |
Solved! Go to Solution.
Hola @giorgiokatr ,
Puede modificar la medida de la siguiente manera:
In group =
VAR _max =
CALCULATE ( DISTINCTCOUNT ( 'Table'[month] ), ALLSELECTED ( 'Table' ) )
RETURN
COUNTX (
FILTER (
SUMMARIZE (
'Table',
'Table'[customer],
'Table'[group],
"_count", DISTINCTCOUNT ( 'Table'[month] )
),
[_count] = _max
&& [group] = SELECTEDVALUE ( 'Table'[group] )
),
[customer]
)
Cree otra medida para calcular no en este grupo:
Not in this group =
VAR _count =
CALCULATE ( DISTINCTCOUNT ( 'Table'[customer] ), ALL ( 'Table' ) )
RETURN
_count - [In group]
Adjunto un archivo de muestra en el siguiente, espera ayudarle.
Best Looks,
Yingjie Li
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
@giorgiokatr , Pruebe este
medida :
var _max -calculate(distinctcount(Table[month]), allselcted(Table))
devolución
countx(filter(summarize(Table,table[customer],"_1",distinctcount(Table[month])),[_1] -_max),[cliente])
it works @amitchandak great! can i add a second filter the group?
for example to find customers that are in 1,2,3 month and (not or ) in group b?
Hola @giorgiokatr ,
Puede modificar la medida de la siguiente manera:
In group =
VAR _max =
CALCULATE ( DISTINCTCOUNT ( 'Table'[month] ), ALLSELECTED ( 'Table' ) )
RETURN
COUNTX (
FILTER (
SUMMARIZE (
'Table',
'Table'[customer],
'Table'[group],
"_count", DISTINCTCOUNT ( 'Table'[month] )
),
[_count] = _max
&& [group] = SELECTEDVALUE ( 'Table'[group] )
),
[customer]
)
Cree otra medida para calcular no en este grupo:
Not in this group =
VAR _count =
CALCULATE ( DISTINCTCOUNT ( 'Table'[customer] ), ALL ( 'Table' ) )
RETURN
_count - [In group]
Adjunto un archivo de muestra en el siguiente, espera ayudarle.
Best Looks,
Yingjie Li
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @giorgiokatr
¿Puede probar lo siguiente:
Show_Common_Values =
VAR MONTH1 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), ALL('Table'),'Table'[month] = 1,'Table'[group]="b" )
VAR MONTH2 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), ALL('Table'),'Table'[month] = 2 ,'Table'[group]="b" )
VAR MONTH3 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), ALL('Table'),'Table'[month] = 3 ,'Table'[group]="b" )
RETURN
CALCULATE (
MAX ( 'Table'[customer] ),
INTERSECT ( INTERSECT ( MONTH1, MONTH2 ), MONTH3 )
)
Cree una nueva medida y agregue la siguiente fórmula:
Dups =
VAR MONTH1 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), 'Table'[month] = 1 )
VAR MONTH2 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), 'Table'[month] = 2 )
VAR MONTH3 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), 'Table'[month] = 3 )
RETURN
CALCULATE (
MAX ( 'Table'[customer] ),
INTERSECT ( INTERSECT ( MONTH1, MONTH2 ), MONTH3 )
)
gracias @themistoklis !
¡Gracias!
¿es posible trabajar cuando agredo la segmentación de datos para la columna de grupo también?
Pruebe lo siguiente
Show_Common_Values =
VAR MONTH1 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), ALL('Table'),'Table'[month] = 1 )
VAR MONTH2 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), ALL('Table'),'Table'[month] = 2 )
VAR MONTH3 =
CALCULATETABLE ( VALUES ( 'Table'[customer] ), ALL('Table'),'Table'[month] = 3 )
RETURN
CALCULATE (
MAX ( 'Table'[customer] ),
INTERSECT ( INTERSECT ( MONTH1, MONTH2 ), MONTH3 )
)
muchas gracias, pero mi único problema es que la segmentación contiene muchos monhts y la segmentación de grupo contiene 120 valores.
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 |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 |