Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello all,
Below is my dax code for allocating expected budget goals evenly throughout the year. However, my sales data in updated to power bi a day late. This means my allocation is the expected budget for today, but my sales data is for yesterday, not today.
How can I subtract one day from my budget allocation, so allocation matches the sales data
Thank you
Solved! Go to Solution.
How about
VAR __datesV =
DATESBETWEEN (
'Calendar'[Date],
MIN ( 'Sales Actual'[Order Date] ),
MIN ( MAX ( 'Sales Actual'[Order Date] ), TODAY ( ) - 1 )
)
Please try
VAR __datesV =
DATESBETWEEN (
'Calendar'[Date],
MIN ( 'Sales Actual'[Order Date] ),
MAX ( 'Sales Actual'[Order Date] )
)
Hello @tamerj1,
Thanks for the solution. While your solution should work in most cases, it won't work in mine. My report has a few data that spills in from the current day.
Example - the report was initated at 12:00 AM and take 15 mins to create and export to the server. We sometime get sales data in that time for the current date usually less than 100 records but I'd like to exclude them totally hence I cannot use MAX ( 'Sales Actual'[Order Date] ).
Let me know if you have any suggestions.
My thanks,
Dan
How about
VAR __datesV =
DATESBETWEEN (
'Calendar'[Date],
MIN ( 'Sales Actual'[Order Date] ),
MIN ( MAX ( 'Sales Actual'[Order Date] ), TODAY ( ) - 1 )
)
User | Count |
---|---|
47 | |
26 | |
22 | |
17 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |