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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Contar o mostrar valores en la columna si hay una coma

Hola

A menudo tengo varios artistas en mi mesa separados por una coma, pero quiero contarlos y mostrarlos no como un valor, pero por ejemplo si hay Futuro, Lil Uzi Vert Quiero mostrarles como 2 artistas varios. ¿Qué medida puede hacer esto por mí?

Vea este ejemplo:

multiplevalues.PNG

4 REPLIES 4
mahoneypat
Employee
Employee

Estoy de acuerdo en que debería dividir y preparar mejor los datos. Si realmente necesitas hacerlo en el formulario actual puedes usar una medida como esta.

Recuento de Artistas ?
SUMX (
Mesa
LEN ( Tabla[artistas] )
- LEN (
SUSTITUIR (
Mesa[artistas],
",",
""
)
) + 1
)

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


AllisonKennedy
Super User
Super User

@mrstillchicken Es posible que sea mejor dividir estos datos mediante delimitador mediante Power Query. Puede dividir los datos en filas y, a continuación, solo tiene que utilizar un simple COUNT(Table[Artists]) para obtener el total de artistas.

AllisonKennedy_0-1609067503644.png


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

¡Gran! ¡No sabía que esta característica estaba ahí!

@AllisonKennedy es como ella dice, yo también recomendaría más su solución cuando se divide los valores de subtitulado para eliminar los caracteres ,[,',", etc. para que tenga sólo el nombre en él y se vean más amigables con los datos.





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors