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

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.

Reply
fabd
Helper I
Helper I

¿Cómo agrupar por ?

Hola

lo siento por esta pregunta básica. Me quedo en la comunidad antes de publicar. Encontré algo de ayuda, pero no pude implementar estos consejos en mi caso.

Por lo tanto, tengo una siguiente tabla:

pbigroup.png

Me gustaría generar un informe como este:

Modelo , datemonth, CPU, Frecuencia, RAM

grupo por modelo, datemonth, CPU, frecuencia, RAM con recuento de modelo único

Ie:

Proliant ML350GEN10, 2020-2-11 Intel, ,2500 , 512 , 4

Proliant ML350GEN10, 2020-3-14 Intel, ,2500 , 512 , 1

Traté de utilizar la función RESUME sin suerte.

Tengo el siguiente error:

La expresión hace referencia a varias columnas. Varias columnas no se pueden convertir en un valor escalar.

si pongo 1 elemento, se requieren varios, y si pongo varios, otro error ...

¿Puedes darme un consejo?

1 ACCEPTED SOLUTION

Hola @fabd ,

Lamento mi error. Por favor, pruebe la fórmula a continuación.

Table 2 = 
SELECTCOLUMNS (
    'Table',
    "Model", 'Table'[Model],
    "DateMonth", 'Table'[datemonth],
    "CPU", 'Table'[CPU],
    "Frequency", 'Table'[Frequency],
    "RAM", 'Table'[RAM],
    "DistinctCount", CALCULATE (
        DISTINCTCOUNT ( 'Table'[Model] ),
        ALLEXCEPT ( 'Table', 'Table'[datemonth] )
    )
)

3.PNG

Cambié los datos de la muestra. Para obtener más información, consulte los datos adjuntos.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-xuding-msft
Community Support
Community Support

Hola @fabd ,

¿Desea crear una nueva tabla? Si es así, podrías intentar así:

Table 2 =
SELECTCOLUMNS (
    'Table',
    "Model", 'Table'[Model],
    "DateMonth", 'Table'[datemonth],
    "CPU", 'Table'[CPU],
    "Frequency", 'Table'[Frequency],
    "RAM", 'Table'[RAM]
)

2.PNG

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hola Xue,

¿Cómo se hace un grupo para contar el número de modelo para cada año/mes?

Hola @fabd ,

Lamento mi error. Por favor, pruebe la fórmula a continuación.

Table 2 = 
SELECTCOLUMNS (
    'Table',
    "Model", 'Table'[Model],
    "DateMonth", 'Table'[datemonth],
    "CPU", 'Table'[CPU],
    "Frequency", 'Table'[Frequency],
    "RAM", 'Table'[RAM],
    "DistinctCount", CALCULATE (
        DISTINCTCOUNT ( 'Table'[Model] ),
        ALLEXCEPT ( 'Table', 'Table'[datemonth] )
    )
)

3.PNG

Cambié los datos de la muestra. Para obtener más información, consulte los datos adjuntos.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

gracias xue, voy a tratar de

Hola de nuevo,

Gracias por el tutorial rápido para trabajar con una nueva tabla.

Tuve éxito en hacer lo que quería. Gracias a todos por result.png su ayuda !

Hola @fabd ,

Me alegra que lo hayas resuelto. 🙂 ¿Puede compartir su fórmula y aceptarla como solución? Más personas que tienen el mismo requisito se beneficiarán aquí.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@fabd , ¿Puede compartir el resumen que ha utilizado.

Lo que queda para el recuento diferenciado después de seleccionar el modelo

resumir(Table, Table[model], Table[datemonth], Table[CPU], Table[Frequency], Table[RAM] ,"Unique Model", distinctCOUNT(Table[Name]))

Hola chicos,

Siguiendo su consejo, aquí está el resultado con el summarize()

scalar.png

Para la matriz, esto es sólo lo que tuve éxito para hacer

matrix.png

Me gustaría algo como esto en una tabla simple que podría exportar a csv después de :

serverModelName,manufacturer,numCpus,cpuType,cpuGhz,memGb,numberOfServers,dateOfPurchase,pricePerServer,
batchType,dataCenterName

VijayP
Super User
Super User

Simplemente intente crear la tabla MAtix use filas y columnas para dar cabida a los campos y hágamelo saber si hay algún problema y pegue la instantánea para ver qué más necesita.

Si esta es una respuesta, entonces usted puede mencionar esto como una respuesta y compartir su Kudoes

saludos

Vijay Perepa

puedes ver mis videos en www.youtube.com/perepavijay




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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