cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors