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.
Hola, chicos
Tengo una pestaña:
Boleto ? Fecha ?
Un 01-2017
B n.o 01-2017
C n.o 01-2018
C n.o 01-2018
D '01-2019'
E .01-2019
E .01-2019
Contaría valores distintos en cada mes de cada año y seleccionaría el valor máximo y mínimo para cada mes (enero-diciembre).
Si uso la función MAX, no puedo escribir un recuento distinto. ¿Ideas? thank's
Hola @aalesssio ,
Podemos usar dos maneras de satisfacer sus necesidades.
Una es crear una medida y usar la función IF para obtener el resultado. Otra es la creación de una columna de cálculo y, a continuación, crear una medida mediante la función MAXX.
Necesitamos crear la columna del año y la columna del mes en primer lugar.
Year = YEAR('Table'[date])
Month = MONTH('Table'[date])
1. La primera solución: Puede hacer referencia a la lógica de la siguiente medida.
Measure =
var _2017_count = CALCULATE(DISTINCTCOUNT('Table'[ticket]),'Table'[Year]=2017)
var _2018_count = CALCULATE(DISTINCTCOUNT('Table'[ticket]),'Table'[Year]=2018)
return
IF(_2017_count>_2018_count,_2017_count,_2018_count)
2. La segunda solución: necesitamos crear una columna de cálculo en primer lugar.
Column = CALCULATE(DISTINCTCOUNT('Table'[ticket]),FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])&&'Table'[Month]=EARLIER('Table'[Month])))
Entonces podemos crear una medida para obtener el resultado,
Measure 2 = MAXX(FILTER('Table','Table'[Month]=MAX('Table'[Month])),'Table'[Column])
Si no cumple con sus requisitos, ¿podría proporcionar una muestra de maqueta basada en datos falsos o describir los campos de cada tabla y las relaciones entre tablas simplemente?
Será útil si puede mostrarnos el resultado esperado exacto basado en las tablas.
Cargue sus archivos en OneDrive para la Empresa y comparta el enlace aquí. Por favor, no contenga ninguna Información Confidencial o Datos Reales en su respuesta.
BTW, pbix como adjunto.
Saludos
Equipo de apoyo a la comunidad _ zhenbw
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
@aalesssio , en MAXX puede utilizar distinctcount .
Estas cosas que usted debe ser capaz de conseguir con la columna Año mes
Maxx(Values(Table[Month]),distinctcount(Table[Ticket]))
@aalesssio intentes esto
Max Value =
MAXX (
Values( Table[Month] ),
CALCULATE ( DISTINCTCOUNT ( Table[Ticket] )
)
de manera similar se puede utilizar la función MINX para el valor mínimo.
Me gustaría❤ elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!
⚡Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
¡Gracias! La solución está cerca de...
Escribo:
@aalesssio no sé cómo se ven tus datos, te dará un recuento distinto de tickets, si publicas datos de un mes, te ayudará a entender por qué no funciona o qué falta aquí.
Pregunta rápida, ¿realmente quieres un recuento distinto de entradas para cada mes o entradas totales en el mes.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |