Forum Discussion
Display this week & this month's data filter/Flag
Hi
I would like to put a marker in my Calander table which will change dynmaicly according to the present date. I would like a marker for today, this week, this month, this quater and year.
I have in my calanader table our fiscal year, with correct data, but would like a marker (indicator) so i can use this on Visual level Filters
I am sure this will be very easy for someone more experience than this learner (ME)!!!
Many thanks
Tim
Generally this is done with an "IsToday" kind of column. So, assuming that you have a Calendar/Date table like:
Date
1/1/2017
You could build a column like:
IsToday = IF(DAY([Date]) = DAY(TODAY()) && MONTH([Date]) = MONTH(TODAY()) && YEAR([Date]) = YEAR(TODAY()),1,0)
There are variations on this theme depending on your data format but this is the general gist of things. Your other flags would be similar formulas.
12 Replies
- Greg_Deckler
Community Champion
Generally this is done with an "IsToday" kind of column. So, assuming that you have a Calendar/Date table like:
Date
1/1/2017
You could build a column like:
IsToday = IF(DAY([Date]) = DAY(TODAY()) && MONTH([Date]) = MONTH(TODAY()) && YEAR([Date]) = YEAR(TODAY()),1,0)
There are variations on this theme depending on your data format but this is the general gist of things. Your other flags would be similar formulas.
- tmears
Helper III
Brilliant many thanks
i also have a calcualted column with our fiscal year and fiscal quarter calcualted, would i be able to use this to return wether today in in the present fiscal year and fiscal quarter??
Thanks so much for your help
Tim- Greg_Deckler
Community Champion
I can't imagine why not, is the calculated column in the Query Editor or a DAX column? And what are the formulas?