Visualizing last refresh date in power bi

。_饼干妹妹 提交于 2019-12-12 14:28:08

问题


Is it possible to add a card in power BI that shows the last time the underneath dataset has been updated?

Many thanks!


回答1:


You can create a blank query and use the following M query to create a single-cell table:

let
    Source = #table(type table[Last Refresh=datetime], {{DateTime.LocalNow()}})
in
    Source

And then you can use the Card visual and drag in the column to show it. You can rename the field to remove the default aggregation. (It doesn't matter since there is only one row of data anyways)

The value will be recalculated each time the data is refreshed.




回答2:


you can achieve this by adding a calculated column (Refresh data Column) in the model with the formula =NOW()

Then add measure

Last Refresh Date :=MAX(Table[Last Refresh Column])

Since calculated columns are calculated only on model refresh - it will make sure the calculation is right.




回答3:


Depending on the location it's really confusing with all those functions.. Let me suggest you the workable one: Go to the:

Query Editor 1.right click on the Queries body on the left side 2.new queries 3.Blank Queries 4.Paste the following formula by putting the right Server Instances and DB Name, " = Sql.Database("Server\Instance", "Database", [Query="select GETDATE() LastRefreshDate from AnyTableName"])

It'll work out. And since it's pulling directly from the server,, you don't have to worry about choosing the right DateTimeZone functions in PowerBI.



来源:https://stackoverflow.com/questions/46236102/visualizing-last-refresh-date-in-power-bi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!