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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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