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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Crear tabla calculada con valores calculados a partir del valor seleccionado en una visualización.

Buenas tardes.

Os explico el caso, tengo :

 

- Tabla Calendario (DAX)

- Segmentador (Filtro desplegable) del campo "Fecha" de la tabla calendario.

- Segmentador (Filtro desplegable) con el número de registros que quiero visualizar ( 1,2,3... 15)

- Tabla de valores con fechas, nº de semana e importes.

 

Necesito que al seleccionar una fecha, me tome su valor y le descuente tantas semanas como número aparezca en el segmentador, por ejemplo...  Fecha Seleccionada: 28/01/2021  Nº de Registros: 2 --> Fecha resultante: 14/01/2021

Una vez tengo esa fecha resultante, necesito filtrar la tabla de valores para que muestre sólo aquellos registros comprendidos entre la Fecha resultante y la Fecha Selecciona, por ejemplo ...  14/01/2021, 15/01/2021, 16/01/2021 ... 28/01/2021.

 

Me puedes explicar cómo podría aplicar estos cálculos y filtros desde los segmentadores ?

 

Les agradezco de antemano su ayuda. Mil gracias a todos.

1 REPLY 1
lbendlin
Super User
Super User

If your calendar table is linked to your data model (as it should be) then your approach will not work. You need to create a separate table with dates and use that new table for the date slicer.

 

Then you can use the SELECTEDVALUE() function for both the Date slicer and the week count slicer to compute your measure.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.