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
esosa
Frequent Visitor

Medida para una tarjeta.

Buen día estimada comunidad, quisiera solicitar su valiosa ayuda. 

Cuento con una tabla que me muestra el monitoreo que se hace por medio de una aplicación a los computadores, dentro de esta tabla cuento con una columna que se llama Escala de uso, la cual me indica 4 niveles:

 

Necesito una medida que me arroje, no la cantidad  numérica del más alto, si no el texto del que mas se repite para incluirlo en una tarjeta o visualización, 

 

esosa_0-1650821708546.png

 

Resultado esperado segun ejemplo, Una Tarjeta con la esca mas alta  ,

 Visualización Tarjeta =  > 8 Horas

2 ACCEPTED SOLUTIONS
tackytechtom
Super User
Super User

Hi @esosa ,

 

I used google translate to try to understand what you are after. I believe you would like to find out the value in the column escala de uso which appears the most.

 

Here a possible solution:

tomfox_0-1650822685274.png

 

Here the measure in DAX:

MeasureCountEscalaDeUno = 
FIRSTNONBLANK (
    TOPN (
        1, 
        VALUES ( Table[Escala de uno] ), 
        RANKX ( ALL ( Table[Escala de uno] ), COUNT ( [Escala de uno] ),,ASC)
    ), 
    1 
)

 

 I took the formular from here:

Solved: How to obtain the most common value from a column ... - Microsoft Power BI Community

 

Here iis even more to read:

Alternative use of FIRSTNONBLANK and LASTNONBLANK - SQLBI

 

Let me know if this solved your issue 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

PaulDBrown
Community Champion
Community Champion

 

Prueba:

 

Escala más alta= 
    CONCATENATEX (
        TOPN (
            1,
            ADDCOLUMNS (
                VALUES ( 'Table'[Escala de uso] ),
                "Veces", CALCULATE ( COUNTROWS ( 'Table' ) )
            ),
            [Veces]
        ),
        'Table'[Escala de uso],
        ", "
    )

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

 

Prueba:

 

Escala más alta= 
    CONCATENATEX (
        TOPN (
            1,
            ADDCOLUMNS (
                VALUES ( 'Table'[Escala de uso] ),
                "Veces", CALCULATE ( COUNTROWS ( 'Table' ) )
            ),
            [Veces]
        ),
        'Table'[Escala de uso],
        ", "
    )

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






tackytechtom
Super User
Super User

Hi @esosa ,

 

I used google translate to try to understand what you are after. I believe you would like to find out the value in the column escala de uso which appears the most.

 

Here a possible solution:

tomfox_0-1650822685274.png

 

Here the measure in DAX:

MeasureCountEscalaDeUno = 
FIRSTNONBLANK (
    TOPN (
        1, 
        VALUES ( Table[Escala de uno] ), 
        RANKX ( ALL ( Table[Escala de uno] ), COUNT ( [Escala de uno] ),,ASC)
    ), 
    1 
)

 

 I took the formular from here:

Solved: How to obtain the most common value from a column ... - Microsoft Power BI Community

 

Here iis even more to read:

Alternative use of FIRSTNONBLANK and LASTNONBLANK - SQLBI

 

Let me know if this solved your issue 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

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.