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

Relative Dates - more options

Hi

I woudl like to use the releitive date filter to say is not in the last calendar week (for example), but I can only filter on inclusions, not exclusions. 

 

Does anyone know if there is a way to create a flag from a date field in DAX so that I can use that in the filter instead?

I can't used advanced filtering as this means I would have to go and update the date each week. 

 

I am not in a position to amend or create anything in Power Query.

 

thanks in advance for your suggestions.

H

4 REPLIES 4
Anonymous
Not applicable

Hi, no it's not to use in a date slicer. I have a card that holds a total of appointments that show as having a planned date for the previous week, I can use a differnt field filter on these appointments to show what was actually attended using relative date in the last calendar week, but if i want to create a card that shows appointments that were planned for the previous week but were not attended in the previous week, relavtive date filter doesn't allow this.

Hi @Anonymous ,

 

Maybe you can just create a measure to calculate the result via 

not attend =
var _lastweekstart = today() - weekday(TODAY(),2)-7
var _lastweekend = _lastweekstart+6
return
COUNTROWS(FILTER('calendar',[Date]>=_lastweekstart&&[Date]<=_lastweekend &&[status]="not attended"))
 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,
Thanks for this. there is no field to hold a status of "not attended"
I have a table that shows when appointments were scheduled to be attended, and another table that shows when they were attended.
Appointments maybe scheduled many times, but only attended once.
The question I wish to answer is how many were scheduled for last week, but not attended (because they were rescheduled).
scheduled date in last week, attended date not in last week.

amitchandak
Super User
Super User

@Anonymous , Not very clear. Do you want a relative date option with date slicer.

 

Then refer

https://community.powerbi.com/t5/Desktop/Required-custom-date-Slicer-Last-7-days-last-15-days-last-30/m-p/1284966#M561629

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

 

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.