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

Make measure including future date

I need to create a measure that calculates the amount of id_avaliacao where the status = "Reprovado" taking into account 5 days after the page filter.
Example: filter data_conclusao 2023-01-01 to 2023-01-01. Measure result: 6

 

id_avaliacaodata_conclusaostatus
634968862023-01-03Reprovado
634977052023-01-04Reprovado
634977022023-01-04Reprovado
634976492023-01-04Reprovado
634982122023-01-05Reprovado
634979682023-01-05Reprovado
634979972023-01-06Reprovado
634979892023-01-06Reprovado
634980062023-01-06Reprovado






2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Anonymous 

Please try

Measur =
VAR CurrentDate =
MAX ( 'Table'[data_conclusao] )
RETURN
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Status] = "Reprovado"
&& 'Table'[data_conclusao] > CurrentDate
&& 'Table'[data_conclusao] <= CurrentDate + 5
)
)

View solution in original post

@Anonymous 

Please try

Measure =
VAR MinDate =
MIN ( 'Table'[data_conclusao] )
VAR MaxDate =
MAX ( 'Table'[data_conclusao] )
RETURN
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Status] = "Reprovado"
&& 'Table'[data_conclusao] > MinDate
&& 'Table'[data_conclusao] <= MaxDate + 4
)
)

View solution in original post

4 REPLIES 4
devanshi
Helper V
Helper V

filterpage=
VAR maxdate = MAX(data-conclusao)
RETURN

COUNTROWS(FILTER('Tablename',[status]='Reprovado',
AND('Table'[data-conclusao]>maxdate,'Table'[data-conclusao]<=maxdate+5)))

tamerj1
Super User
Super User

Hi @Anonymous 

Please try

Measur =
VAR CurrentDate =
MAX ( 'Table'[data_conclusao] )
RETURN
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Status] = "Reprovado"
&& 'Table'[data_conclusao] > CurrentDate
&& 'Table'[data_conclusao] <= CurrentDate + 5
)
)

@Anonymous 

Please try

Measure =
VAR MinDate =
MIN ( 'Table'[data_conclusao] )
VAR MaxDate =
MAX ( 'Table'[data_conclusao] )
RETURN
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Status] = "Reprovado"
&& 'Table'[data_conclusao] > MinDate
&& 'Table'[data_conclusao] <= MaxDate + 4
)
)

Anonymous
Not applicable

Hi @tamerj1 
Did not work.
When I filter by date 2023-01-01 to 2023-01-01, the measurement result is 9.
When filtered by date 2023-01-01 to 2023-01-05, the measurement result is 3.

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.

Top Solution Authors