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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.