Forum Discussion

tmears's avatar
tmears
Icon for Helper III rankHelper III
9 years ago
Solved

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's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity 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's avatar
      tmears
      Icon for Helper III rankHelper 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's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        I can't imagine why not, is the calculated column in the Query Editor or a DAX column? And what are the formulas?