Forum Discussion
Display this week & this month's data filter/Flag
- 9 years ago
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.
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.
- tmears9 years ago
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_Deckler9 years ago
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?
- tmears9 years ago
Helper III
its a dax column, i have the following columns:
FiscalMonth = (If( Month([Date]) >= 4 , Month([Date]) - 3,Month([Date]) + 9 ))
FiscalYearNumber = If( Month([Date]) >= 4 , Year([Date]),Year([Date]) -1 )
FiscalYearDisplay = "FY"&Right(Format([FiscalYearNumber],"0#"),2)&"-"&Right(Format([FiscalYearNumber]+1,"0#"),2)
FiscalQuarterNumber = ROUNDUP([FiscalMonth]/3,0)
FiscalQuarterDisplay = "FQ" & format([FiscalQuarterNumber],"0")