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
Anonymous
Not applicable

Desea obtener el intervalo de fechas seleccionados (inicio y fin) de Date Slider Slicer en el modo de consulta directa

Hola a todos

Quiero calcular 12 meses de los miembros rodantes retenidos. Tengo Date Slider Slicer en Power BI Report.

Retention_In_12Months de la casa de los 20o (en
VAR CurrentDate - SELECTEDVALUE(RETENTION[fulldate])

VAR PreviousDate - CurrentDate - 365

devolución
CALCULAR (
SUMA ( RETENCION[Member_Retention] ),
FILTRO (
Retención
RETENCION[fulldate] >- Fecha anterior
&& Retention[fulldate] <- CurrentDate
)
)
Pero no está funcionando.
¿Cómo puedo obtener la fecha de inicio y finalización de Date Slider Slicer y usarla en el cálculo anterior?
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Así es como logré:

SelectedDateStart - CALCULATE (
MIN (RETENTION[fulldate]),
FILTRO (
ALLSELECTED (RETENTION[fulldate]),
RETENCION[fulldate] > - MIN (RETENTION[fulldate])
))
SelectedDateEnd - CALCULATE (
MAX (RETENCION[fulldate]),
FILTRO (
ALLSELECTED (RETENTION[fulldate]),
RETENCION[fulldate] <-MAX (RETENTION[fulldate])
) )
Retention_In_12Months de la casa de los 20o (en
Fecha de corriente de VAR : CALCULATE (
MAX (RETENCION[fulldate]),
FILTRO (
ALLSELECTED (RETENTION[fulldate]),
RETENCION[fulldate] <-MAX (RETENTION[fulldate])
) )
VAR PreviousDate - CurrentDate - 365
devolución
CALCULAR (
SUMA ( RETENCION[LLC_Retention] ),
FECHAS ENTRE LAS FECHAS (
RETENTION[fulldate], PreviousDate, CurrentDate
))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Así es como logré:

SelectedDateStart - CALCULATE (
MIN (RETENTION[fulldate]),
FILTRO (
ALLSELECTED (RETENTION[fulldate]),
RETENCION[fulldate] > - MIN (RETENTION[fulldate])
))
SelectedDateEnd - CALCULATE (
MAX (RETENCION[fulldate]),
FILTRO (
ALLSELECTED (RETENTION[fulldate]),
RETENCION[fulldate] <-MAX (RETENTION[fulldate])
) )
Retention_In_12Months de la casa de los 20o (en
Fecha de corriente de VAR : CALCULATE (
MAX (RETENCION[fulldate]),
FILTRO (
ALLSELECTED (RETENTION[fulldate]),
RETENCION[fulldate] <-MAX (RETENTION[fulldate])
) )
VAR PreviousDate - CurrentDate - 365
devolución
CALCULAR (
SUMA ( RETENCION[LLC_Retention] ),
FECHAS ENTRE LAS FECHAS (
RETENTION[fulldate], PreviousDate, CurrentDate
))
amitchandak
Super User
Super User

@ShivendooKumar , Crear una tabla de fechas (puede tenerlo en modo de importación si no está en la base de datos)

Fecha como modo de importación -https://www.youtube.com/watch?v=cQfJ0GmQ5os&list=PLPaNVDMhUXGbKatyDdOhGbTL3xW2Xy6pA&index=7

Fecha en la base de datos - https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intell...

Minación de 12 meses

Rolling 12 á CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

O

Rolling 365 day á CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],MAX(Sales[Sales Date]),-365,Day))

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.