Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Cómo clasificar y obtener una lista de usuarios para hacer segmentos dyanamic

Hola , estoy tratando de hacer la lista de usuarios dyanamic basado en su frecuencia.

Captura de pantalla Lo que intento obtener:

skondi_0-1603465246960.png

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

6 REPLIES 6
v-eqin-msft
Community Support
Community Support

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

Anonymous
Not applicable

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:

 

skondi_0-1604065462289.png

 

----------------------------------------------------------------------------------------------------------

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

v-eqin-msft
Community Support
Community Support

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:

10.27.4.1.PNG

Aquí está el archivo pbix.


¿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

Anonymous
Not applicable

@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?

amitchandak
Super User
Super User

@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

Anonymous
Not applicable

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors