Forum Discussion

kylechapin's avatar
kylechapin
Frequent Visitor
8 years ago
Solved

Show Today's date on report

Hi there,   Pretty new to Power BI and I'm having a few troubles.  One of them is getting the date on my report.  Nothing fancy, just todays date and refreshed every time the report is accessed.  ...
  • TomMartens's avatar
    TomMartens
    8 years ago

    Hey,

     

    if you are new to this measure thing start here

    https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-measures/

     

    Basically measures and also calculated column are calculations added to your data model, from a very superficial view one can say that calculated columns are expanding the tables in your data model, and behave like any other column in your table. Measures on the other hand are calculations that "lay on top" of the tables.

     

    You have to be aware, that currently it is not possible to add measures to the data model from within the service. This means you have to use Power BI Desktop to add the measure to one of the existing tables (I would recommend to use a separate date table, if one exists in your model). After you added the measure following the explanation from the link above, you have to republish the dataset to the service. In the model pane you can also specify a display format.

     

    Now you can go to the service, open the report, switch to edit mode, add the card visual and drag the measure to the value field of the visual.

     

    Hope this gets you started!

     

    Regards

    Tom

     

  • Anonymous's avatar
    Anonymous
    8 years ago

     

    Hello kylechapin

    See attached screenshot.








    Under the "Home" tab and "Calculations" ribbon there is a button to create measures.

    In that measure you can paste the text "NowDatetime = NOW()" wich will create a measure with te name "NowDatetime" that shows you the current datetime using the NOW() function.

    You can also right-click a table in the fields pane and choose new measure if you want.

    Put this measure on a card and the card will display the date and time.

     


    Also, i can recommend reading the tutorial for creating measures.
    https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-tutorial-create-measures/

    Regards
    Max