Forum Discussion
problems with calculated column
how can I build the measure I need with the operation you indicated?
I only need a measure that can set a flag to 1 if the tkt has the closing date within the range of dates selected in the date filter, otherwise set it to 0. obviously, in the table, only the tkts that also have the creation date within the range of dates selected must be displayed.
Example - date selected 2024-12-09 / 2024-12-15
Thanks!
Hi Filippo91d,
Thank you for reaching out in Microsoft Community Forum.
Thank you Deku for the helpful response.
Please use below DAX for the required output
1.Create a measure for the flag
TKT_ClosedInRange_Flag =
VAR StartDate = MIN('_calendar'[Date])
VAR EndDate = MAX('_calendar'[Date])
RETURN
IF (
MAX('Tickets_DataApertura'[TKT_ClosureDate - Date]) >= StartDate &&
MAX('Tickets_DataApertura'[TKT_ClosureDate - Date]) <= EndDate,
1,
0
)
2.Apply a visual-level filter
TKT_OpenInRange_Flag =
VAR StartDate = MIN('_calendar'[Date])
VAR EndDate = MAX('_calendar'[Date])
RETURN
IF (
MAX('Tickets_DataApertura'[TKT_CreationDate - Date]) >= StartDate &&
MAX('Tickets_DataApertura'[TKT_CreationDate - Date]) <= EndDate,
1,
0
)
Please continue using Microsoft Community Forum.
If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.
Regards,
Pavan.