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.
Hi,
I am trying to figure out a way when i refresh my data at the end of the day, the measure would pull the latest Day over Day measure. For example, if i refreshed my data at the end of today (June 16th) and i look at it later today or even tomorrow before the next refresh would happen, it would show the day over day % change for June 16th. If you need a value, you can use sales as a sample value.
Let me know if it is possible. Thanks!
Solved! Go to Solution.
Hi @Jpahl2033 ,
According to your description, I create a sample.
If you want to show the division of the previous day and the latest day, here's my solution.
Create a measure.
Day over Day =
VAR _Today =
CALCULATE (
SUM ( 'orders data weekly'[Sales] ),
'orders data weekly'[OrderDate]
= MAXX ( ALL ( 'orders data weekly' ), 'orders data weekly'[OrderDate] )
)
VAR _Pre =
CALCULATE (
SUM ( 'orders data weekly'[Sales] ),
'orders data weekly'[OrderDate]
= MAXX ( ALL ( 'orders data weekly' ), 'orders data weekly'[OrderDate] ) - 1
)
RETURN
DIVIDE ( _Pre, _Today )
Get the result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Jpahl2033 ,
According to your description, I create a sample.
If you want to show the division of the previous day and the latest day, here's my solution.
Create a measure.
Day over Day =
VAR _Today =
CALCULATE (
SUM ( 'orders data weekly'[Sales] ),
'orders data weekly'[OrderDate]
= MAXX ( ALL ( 'orders data weekly' ), 'orders data weekly'[OrderDate] )
)
VAR _Pre =
CALCULATE (
SUM ( 'orders data weekly'[Sales] ),
'orders data weekly'[OrderDate]
= MAXX ( ALL ( 'orders data weekly' ), 'orders data weekly'[OrderDate] ) - 1
)
RETURN
DIVIDE ( _Pre, _Today )
Get the result.
I attach the sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is my current measure. do you know where i would put that?
@Jpahl2033 In theory: PREVIOUSDAY(MAX('new query'[Last Refreshed]))
@Jpahl2033 Often you just create a query for this that returns a single row and column that is the last refreshed time. DateTime.LocalNow(). Then you can use that in your DAX measures to calculate based upon the last refreshed date.
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 |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |