Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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_avaliacao | data_conclusao | status |
63496886 | 2023-01-03 | Reprovado |
63497705 | 2023-01-04 | Reprovado |
63497702 | 2023-01-04 | Reprovado |
63497649 | 2023-01-04 | Reprovado |
63498212 | 2023-01-05 | Reprovado |
63497968 | 2023-01-05 | Reprovado |
63497997 | 2023-01-06 | Reprovado |
63497989 | 2023-01-06 | Reprovado |
63498006 | 2023-01-06 | Reprovado |
Solved! Go to Solution.
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
)
)
filterpage=
VAR maxdate = MAX(data-conclusao)
RETURN
COUNTROWS(FILTER('Tablename',[status]='Reprovado',
AND('Table'[data-conclusao]>maxdate,'Table'[data-conclusao]<=maxdate+5)))
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
)
)
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
18 | |
17 | |
16 |
User | Count |
---|---|
28 | |
27 | |
19 | |
15 | |
14 |