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
Syndicate_Admin
Administrator
Administrator

¿Cómo puedo contar cuántas veces se repite un recuento de valores repetidos en un objeto visual?

Hola a todos

Tengo un problema que no puedo resolver. ¿Alguno de ustedes tiene una solución?

Permítanme describir el caso:

Tengo una tabla en la que hay 2 columnas, una con un "SoftwareID" y la otra con "HardwareID". Lo que necesito es identificar cuántos "HardwareIDs" tienen 2 SoftwareIDs instalados, 3 softwareIDs istalled y así sucesivamente.

¿Alguna sugestión?

Gracias

6 REPLIES 6
YTNATHALIE
Frequent Visitor

Hola, ¿obtuvo una solución?, tengo el mismo caso y no he consigo solución. 

Syndicate_Admin
Administrator
Administrator

Hola @eduvelrod ,

Puede crear una medida de la siguiente manera. Para su referencia, acabo de crear la medida para 2 SoftwareIDs.

Hardware with 2 SoftwareIDs = 
VAR SummarizedTable = SUMMARIZE('Table','Table'[HardwareID],"TotalSoftwareIDs",COUNT('Table'[SoftwareID]))
VAR With2SIDs = CONCATENATEX(FILTER(SummarizedTable,[TotalSoftwareIDs]=2),'Table'[HardwareID],",")
RETURN
    With2SIDs

rajulshah_0-1654772048433.png

Por favor, hágamelo saber si esto no está funcionando para usted.

Hola @rajulshah tahnk por tu respuesta.

Esto está cerca de lo que quiero, gracias, pero el resultado que me gustaría tener es otra placa no solo para HardwareIDs con dos softwares, necesito tener todos los casos algo así como:

Hardware con 1 sw - 150
Hardware con 2 sw - 100
Hardware con 3 sw - 95
(...)
Hardware con N sw - 2

¿Es esto posible? Muchas gracias

@eduvelrod ,

Cree una tabla calculada de la siguiente manera:

Software Count = GENERATESERIES(1,100,1)

Cambie el nombre de la columna de la tabla calculada como 'Valor de N'.

Y luego cree la medida de la siguiente manera:

Hardware with N SoftwareIDs =
VAR SummarizedTable =
    SUMMARIZE (
        'Table',
        'Table'[HardwareID],
        "TotalSoftwareIDs", COUNT ( 'Table'[SoftwareID] )
    )
VAR With2SIDs =
    COUNTX (
        FILTER (
            SummarizedTable,
            [TotalSoftwareIDs] = SELECTEDVALUE ( 'Software Count'[Value of N] )
        ),
        'Table'[HardwareID]
    )
RETURN
    With2SIDs + 0

El resultado será el siguiente:

rajulshah_0-1654776516636.png

Por favor, hágamelo saber si esto no funciona.

@eduvelrod ,

Si estos son los datos:

Identificadores de hardwareIdentificadores de software
11
12
13
14
21
31
32
42

Luego puede hacerlo en power query:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSAeJYHQjLCM4yhrNMwCwjuDpjFBZEhwmEFQsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [HardwareIDs = _t, SoftwareIDs = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"HardwareIDs", Int64.Type}, {"SoftwareIDs", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"HardwareIDs"}, {{"Count", each _, type table [HardwareIDs=nullable number, SoftwareIDs=nullable number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.RowCount([Count])),
    #"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "No of Softwares"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"No of Softwares", Int64.Type}, {"HardwareIDs", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type1",{"Count"}),
    #"Grouped Rows1" = Table.Group(#"Removed Columns", {"No of Softwares"}, {{"Count", each Table.RowCount(_), Int64.Type}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Grouped Rows1",{{"Count", "No of Hardware Count"}})
in
    #"Renamed Columns1"

El resultado es el siguiente:

mahenkj2_0-1654776239847.png

Espero que ayude.

Syndicate_Admin
Administrator
Administrator

Hola @eduvelrod ,

Entonces, lo que entiendo aquí es que desea contar SoftwareIDs por HardwareIDs, ¿verdad?

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