Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I have my last refresh date that show up in a card visual. I would like to conditional format it so it show in red if it is older than 2 hours.
Do you guys know how to do that ? I searched for a bit but it seems nobody ever needed this, or it is so simple nobody ever asked.
Thanks in advance,
James
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Get "Last Refreshed Date" via the following link”.
How to Show Last Refresh Date in Power BI / Blogs / Perficient
2. Create measure.
Now = NOW()
Last Refreshed Date =
MAX('Last Refreshed Date'[Column1])
Color =
var _datediffminute=
DATEDIFF(
[Last Refreshed Date],[Now],MINUTE)
var _2hour=
60 * 2
return
IF(
_datediffminute>_2hour,"red","green")
3. Visualizations – Callout value – FX.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Get "Last Refreshed Date" via the following link”.
How to Show Last Refresh Date in Power BI / Blogs / Perficient
2. Create measure.
Now = NOW()
Last Refreshed Date =
MAX('Last Refreshed Date'[Column1])
Color =
var _datediffminute=
DATEDIFF(
[Last Refreshed Date],[Now],MINUTE)
var _2hour=
60 * 2
return
IF(
_datediffminute>_2hour,"red","green")
3. Visualizations – Callout value – FX.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
My first idea, would be to create a Mesure to calculate the difference between now and that date-time refresh, and to check if it more than 2 hours.
Example :
MesureTest =
Then you cas use this Mesure for conditionnal formatting.
Using Rules and if your test mesure = 0 (or 1) then choose color.
Let us know if it works
That's what I considered first too. But I can't use my Last refresh table in a dax formula. I can't figure why.
It is actualized by a query that marks it =NOW() so it updates everytime the dataset is refreshed.
Any idea why, or how I could sove this ?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |