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
paolomint
Helper III
Helper III

Título dinámico de varias selecciones de la misma segmentación debanda

Hola a todos,

Mi modelo tiene 2 filtros en todas las páginas: una segmentación DE QUARTER y una segmentación de años

Necesito escribir una media (para usar como TITLE para varias páginas) para obtener los siguientes resultados:

AcciónRESULTADO DE LA MEDIDA
SIN selección DE QUARTER - SELECCION DE AÑOs 2020PERÍODO DE REFERENCIA: 2020
Un cuarto de selección (Q1) - Año 2020PERÍODO DE REFERENCIA: 2020 - Q1
DOS selecciones de CUARTO (Q1/Q2) - Año 2020PERÍODO DE REFERENCIA: 2020 - Q1/Q2
Tres selecciones de cuartos (Q1/Q2/Q3) - Año 2020PERÍODO DE REFERENCIA: 2020 - Q1/Q2/Q3
Cuatro selecciones de cuarto (Q1/Q2/Q3/Q4) - Año 2020PERÍODO DE REFERENCIA: 2020

Espero que alguien pueda ayudarme

gracias por su atención

Adiós

Paul

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hola @paolomint ,

Puede utilizar ISFILTERED() y ALLSELECTED() para obtener el estado de segmentación de datos. Aquí está mi resultado.

1-1.PNG

Aquí está mi archivo de prueba para su referencia.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hola @v-eachen-msft

muchas gracias, me encanta tu solución

Lo puse en mi modelo, funciona pero veo cosas extrañas, nunca antes vistas.

El resultado de la medida es 2020 cuando se seleccionan trimestres (por ejemplo, 2020 - Q1/Q2) pero es 2.020.00 cuando no se seleccionan trimestres.

Como se puede ver en la imagen, no puedo cambiar el tipo de datos (TESTO - TEXTO) o el formato.

¿Qué ha pasado en tu opinión?

Gracias por su apoyo

20200804_155512.jpg

amitchandak
Super User
Super User

@paolomint , ¿están probando YTD?

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únase a ella con la columna de fecha de su/s hecho/s. Consulte:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Apreciamos tus Felicitaciones.

Greg_Deckler
Super User
Super User

@paolomint - Vea si esto ayuda: https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Most-Amazing-Mind-Blowing-Dynamic-Slicer...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.