Good Morning,
The dataset for this is a live/snapshot model that shows the current status for particular sites (Plan IDs). When refreshed, the data shows the current planting amount and status (e.g. 100/scheduled means nothing yet planted, 100/actual means 100 planted).
Each month, we refresh the data then use DAX Studio to extract frozen CSV files, thus giving us a sequence of files that allow us to show change.
Now, for volume of planting, we need to calculate (1) the total amount planted as of the current date, and (2) the amount planted before the current date; the delta between the two is the planting in the current period.
Calculating (1) works fine:
Hi @zhivana ,
Please have a try.
Measure = CALCUATE(MAX('TEST PLANTING'[Amount]),FILTER('TEST PLANTING'[Status]="Actual"&&'TEST PLANTING'[Plan ID]=planid&&'TEST PLANTING'[Refresh Date]<currentdate ))
If it does not work, please provide some data.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Polly,
That did not work. I did however find a similar approach by testing a few options. This works as a calculated column.
Can you explain why the FILTER(ALL) makes it work?
Here is the working approach (calculated column, also works as measure)
Hi @zhivana ,
Please try to learn the difference between column and measure.
Power BI Tutorial: When to Use Calculated Columns and Measures (insightsoftware.com)
There is an example about when to combine all and filter. Please refer to the document to see if it helps you.
https://foresightbi.com.ng/dax/when-to-combine-all-and-filter/
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.
Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!
User | Count |
---|---|
380 | |
101 | |
69 | |
57 | |
48 |
User | Count |
---|---|
328 | |
112 | |
87 | |
76 | |
61 |