The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello - I have the following measures and cannot seem to resolve. Specifically, once the running balance is less than zero, I want to display zero. However, once it is back above zero, I want to restart the running balance using the increase quantity.
Expected formula should calculate as follows for each day and item:
[RemainingBalance_Depot] = {Previous Day [RemainingBalance_Dept]} + {Current Day [Start_Total_Depot] + [Prod_Planned] + [Prod_Unplan] - [Monthly_Training]}
If [RemainingBalance_Depot] <0 then 0 else {Current Day [Start_Total_Depot] + [Prod_Planned] + [Prod_Unplan] - [Monthly_Training]}
Sample data with Expected Outcome is located here:
Sample Data - Expected Outcome
I have the following two measures, with Measure_Depot as a helper Measure. But, the RemainingBalance_Depot Measure does not IGNORE the Previous RemaingBalane_Depot if it is less than 0.
If there are other measures that would get the expected outcome, then great...I am not tied to the measure above. As I am very new to DAX, I am very flexible for learning.
This is impossible in DAX as Power BI has no memory. The only way to do this is in Power Query with List.Accumulate.
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
13 | |
8 | |
8 |