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
jitpbi
Post Patron
Post Patron

mostrar el nombre del dispositivo con el valor máximo

Hola

Tengo que mostrar el texto como : "Dispositivo (A) tiene el máximo (50) Salida"

el siguiente es un conjunto de datos de ejemplo

DispositivoDatetimeSalida
A10/25/2020 10:31:00 AM20
A10/26/2020 10:31:00 AM10
A10/27/2020 10:31:00 AM20
B10/25/2020 10:31:00 AM15
B10/26/2020 10:31:00 AM30
C10/26/2020 10:31:00 AM20
C10/27/2020 10:31:00 AM10

He intentado con el siguiente DAX, pero no obtener el resultado deseado:

Max_Output de la casa de los 20o (en
VAR vals - SUMMARIZE('Table', 'Table'[Device], "Total Output", sum(Table[Output]))
VAR measureMax - MAXX(vals, [Total Output])
Valor de VAR: CALCULATE(MAXX(FILTER(vals, [Total Output] - measureMax), Table[Device]))
devolución
Valor
por favor ayude a mostrar como "Dispositivo (A) tiene la salida máxima (50) "
Gracias
1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hola @jitpbi

con sus datos de muestra obtengo la siguiente solución:

27-10-_2020_17-21-13.png

Max Output = 
VAR _Table = SUMMARIZE('Table',
    'Table'[Device],
    "Sum of Output",SUM('Table'[Output]))
VAR _DeviceWithMaxValue = CALCULATE(MIN('Table'[Device]),FILTER(_Table,MAX([Sum of Output])))
VAR _MaxValue =  MAXX(_Table,[Sum of Output])   
RETURN    
    "Device (" & _DeviceWithMaxValue & ") has the maximum (" & _MaxValue & ") Output"

Con saludos amables desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hola

Prueba estas medidas

Highest output = MAXX(VALUES(Data[Device]),[Value])
Highest selling device = FIRSTNONBLANK(TOPN(1,VALUES(Data[Device]),[Value]),1)
Measure = "Device ("&Data[Highest selling device]&") has the maximum ("&[Highest output]&") output"

Arrastre la tercera medida a un objeto visual de tarjeta. Espero que esto ayude.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
FrankAT
Community Champion
Community Champion

Hola @jitpbi

con sus datos de muestra obtengo la siguiente solución:

27-10-_2020_17-21-13.png

Max Output = 
VAR _Table = SUMMARIZE('Table',
    'Table'[Device],
    "Sum of Output",SUM('Table'[Output]))
VAR _DeviceWithMaxValue = CALCULATE(MIN('Table'[Device]),FILTER(_Table,MAX([Sum of Output])))
VAR _MaxValue =  MAXX(_Table,[Sum of Output])   
RETURN    
    "Device (" & _DeviceWithMaxValue & ") has the maximum (" & _MaxValue & ") Output"

Con saludos amables desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)

Hola @FrankAT ,

He observado un tema en el dax que sugeriste. Siempre muestra el valor mínimo alfabético para el dispositivo:

VAR _DeviceWithMaxValue - CALCULATE(MIN('Table'[Device]),FILTER(_Table,MAX([Sum of Output])))

Por lo tanto, cada vez que muestra A. Por favor, sugiera cómo superar este problema.

Gracias

FrankAT
Community Champion
Community Champion

Hola @jitpbi

thx para su respuesta. La siguiente fórmula es ligeramente diferente a la primera. Lo probé con diferentes valores de salida. Ahora debería funcionar.

Max Output = 
VAR _Table = SUMMARIZE('Table',
    'Table'[Device],
    "Sum of Output",SUM('Table'[Output]))
VAR _MaxValue = MAXX(_Table,[Sum of Output])
VAR _DeviceWithMaxValue = 
    CALCULATE(
        MIN('Table'[Device]),
        FILTER(_Table,[Sum of Output] = _MaxValue)
    )  
RETURN    
    "Device (" & _DeviceWithMaxValue & ") has the maximum (" & _MaxValue & ") Output"

Con saludos amables desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)

Gracias a una tonelada @FrankAT, Funciona perfectamente para mí😊

Pragati11
Super User
Super User

Hola @jitpbi ,

Puede intentar usar la función CONCATENAR en Power BI.

https://docs.microsoft.com/en-us/dax/concatenate-function-dax

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

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.