Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hola , estoy tratando de hacer la lista de usuarios dyanamic basado en su frecuencia.
Captura de pantalla Lo que intento obtener:
En la imagen anterior mi función de clasificación no está funcionando
Ie
FreqeuncyRanking =
Var r = RANKX(Fact_GA_DATA,[% GT_Frequency],,DESC,Skip)
return r
Mi Frequency_GT% es como:
% GT_Frequency =
VAR CurrentFrequency = [M_Frequency]
VAR TotalFrequency =
CALCULATE(
[M_Frequency],
REMOVEFILTERS(Fact_GA_DATA)
)
RETURN
DIVIDE(
CurrentFrequency,
TotalFrequency
)
Avísame ¿cómo puedo hacer que esos segmentos sean dyanamic?
Gracias
Hola @skondi ,
Lo siento por mi malinterpretan... Puede utilizar SUMX() en lugar de SUM( )
SUMX('Fact_GA_DATA',[% GT_Frequency measure])
Si todavía está confundido al respecto, por favor proporcione más detalles sobre su tabla y su problema o compártame con su archivo pbix de su Onedrive for Business. Gracias
Saludos
Eyelyn Qin
Hi @v-eqin-msft , Many thanks for your help, but I am still facing some basic issues.
Part-1 :
I am trying to extract the userID(MUID) but everything is coming under last seg-D as the _sum is 1 for all the MUID.
ExtractSegments(Measure) :
VAR _sum =
CALCULATE (
SUMX(Fact_GA_DATA,[% GT_Frequency] ),
FILTER (
ALL ( 'Fact_GA_DATA' ),
[FreqeuncyRanking] <= MAXX(Fact_GA_DATA,[FreqeuncyRanking] )
)
)
RETURN
IF (
_sum <= 0.25,
"Seg-A",
IF ( _sum < 0.5, "Seg-B", IF ( _sum < 0.75, "Seg-C", "Seg-D" ) )
)
Screenshot:
----------------------------------------------------------------------------------------------------------
Part-2: How can I make Segmentations, based on Custom columns? or by using Measures?
As I have large dataset(16M rows) per year, Currently I am trying to do it on small data sample. can you guide me on how to do this task proplery. my task is to extract the users per segmentation for the selected timeframe.
Link for sample data : SegmentationWorkOct2020.pbix
https://drive.google.com/drive/folders/1fVrKuN044YP1YoBVPf7goB8xcFHW8Omo?usp=sharing
Hola @skondi ,
Según mi entender, quieres establecer una bandera :Seg-A, Seg-B, Seg-C, Seg-D para el Top X de %GT_Frequency cuando es menos de 25%,50%,75%,100%, ¿verdad?
Puede usar la siguiente fórmula:
Measure =
VAR _sum =
CALCULATE (
SUM ( Fact_GA_DATA[% GT_Frequency] ),
FILTER (
ALL ( 'Fact_GA_DATA' ),
'Fact_GA_DATA'[FreqeuncyRanking] <= MAX ( 'Fact_GA_DATA'[FreqeuncyRanking] )
)
)
RETURN
IF (
_sum <= 0.25,
"Seg-A",
IF ( _sum < 0.5, "Seg-B", IF ( _sum < 0.75, "Seg-C", "Seg-D" ) )
)
Mi visualización tiene este aspecto:
¿He respondido a tu pregunta? Por favor, marque mi respuesta como solución. Muchas gracias.
Si no es así, cargue algunas muestras de datos insensibles y la salida esperada.
Saludos
Eyelyn Qin
@v-eqin-msft , Thanks for helping me, but I couldn't use your logic as it can't work on measure for this part.
SUM ( Fact_GA_DATA[% GT_Frequency] )
Fact_GA_DATA[% GT_Frequency] is a Measure ,its not a column. so sum is not working here.
My Measure formula is :
% GT_Frequency =
VAR CurrentFrequency = [M_Frequency]
VAR TotalFrequency =
CALCULATE(
[M_Frequency],
REMOVEFILTERS(Fact_GA_DATA)
)
RETURN
DIVIDE(
CurrentFrequency,
TotalFrequency
)
Can you help me here?
@skondi , Probar como
FreqeuncyRanking (a)
return RANKX (allselected(Fact_GA_DATA[MUID]),[% GT_Frequency],DESC,Skip)
O
FreqeuncyRanking ?
return RANKX(allselected(Fact_GA_DATA[MUID]),[% GT_Frequency],,DESC,Skip) +rand()/100
Muchas gracias @amitchandak , ¿me puede explicar cómo agrupar usuarios para el 1er 25% de ' %GT_Frequency'
Los pasos pueden ser:
1. Quiero sumar (%GT_Frequency) hasta que alcance el 25% de la frecuencia total.
2. Seleccione los usuarios anteriores y asígneles un nombre de segmento como Seg-A