Forum Discussion
peffany
3 years agoFrequent Visitor
How to filter by oldest date
Hello there, I'd like to filter a card visual by the oldest date. It seems like the only options i'm given are filter by date intervals. Below I put a screenshot of the Filter pannel with two...
- 3 years ago
Ok, I should have tested that sorry, this is working for me:
Date filter = If(Calculate(FIRSTDATE('Total'[Date Livraison]),ALL('Total')) = FIRSTDATE('Total'[Date Livraison]),"TRUE","FALSE")Note I had to encase "TRUE" and "FALSE" in quotes, turning them into text for the measure to work.
- 3 years ago
Thanks for the rectification. I haven't tried your method as I've found an alternative one. I created a function column (not sure how you call it...) :
Color Alert =VAR today = TODAY()VAR alert_date = [Date Livraison]RETURNSWITCH(TRUE(),today > alert_date, "Red",BLANK())Thanks for your help. I do appreciate it.
halfglassdarkly
Responsive Resident
3 years agoTry creating a measure as a date filter using something like:
Date filter =
'Dates'[Date Livraison] = FIRSTDATE('Dates'[Date Livraison])
Add it as a filter to your visual/page and filter to TRUE
peffany
3 years agoFrequent Visitor
Thanks for your quick reply I appreciate it.
I'm getting a syntax error for the measure you've given me. I can't seem to troubleshoot it. If you have any further suggestions I would be greatly appreciative. For info my table's name is "Total"
Peffany.