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, I have an indicator that calculates the current balance of goods by calculating the difference between the accumulated totals of the purchased quantity and the quantity sold.
Current balance of goods =
CALCULATE(
[purchased in period)],
FILTER(
ALLSELECTED('Calendar'[Date]),
ISONORAFTER('Calendar'[Date], MAX('Calendar'[Date]), DESC)
)
)
-
CALCULATE(
[sold in period],
FILTER(
ALLSELECTED('Calendar'[Date]),
ISONORAFTER('Calendar'[Date], MAX('Calendar'[Date]), DESC)
)
)
Now I need to get the value of the remainder of goods for the previous day.
It's easy to do it with a physical table, but I can't do it with a DAX. I tried to do it in various ways using DATEADD('Calendar'[Date], -1, DAY), but it didn’t work (either it’s not correct, or I get an error).
Is there a way to do this with the formula ?
Thanks in advance for any help.
Does changing ISONORAFTER to ISAFTER work?
I have found a solution - it is very simple :
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |