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.
I've been attempting to find a solution for this for a while now and haven't been able to.
I'm trying to get the values for the Equipment_Days2 column to read:
14 associated with equipment_qty of 4 (Only including days with qty 4)
17 associated with equipment_qty of 1 (Including days with qty 4, 2 or 1)
15 associated with equipment_qty of 2 (Including days with qty 2 or 4)
Underlying Data
The ALL filter functionality below does not appear to be stripping away the qty row filter in the calculation so that all of the rows associated with the equipment are included in the sum for DaysValue. How can this be done?
Solved! Go to Solution.
This might get you a bit closer.
Equipment_Days2 =
VAR CurrQty = CalculatedDaysTable[equipment_qty]
RETURN
CALCULATE (
SUM ( CalculatedDaysTable[DaysValue] ),
CalculatedDaysTable[equipment_qty] <= CurrQty,
CalculatedDaysTable[equipment_uom] = "Daily"
)
You used ALL on the entire table, which removes the context from all columns. I'd recommend only using it for specific columns unless you really do want to get rid of all the filtering.
Unfortunately this results in the exact same output as I've been continuously getting, with the additions not being cumulative.
This formulation did work once it was converted to a measure.
If you're trying to do this as a calculated column, then you have to get the context exactly right. Either remove filters on all the columns you don't want or remove all filters except for a specific set of columns you do want.
I can't tell what all columns you have in your table, so I can't do much more than an educated stab in the dark and you'll have to adjust it to fit your particular table.
This might get you a bit closer.
Equipment_Days2 =
VAR CurrQty = CalculatedDaysTable[equipment_qty]
RETURN
CALCULATE (
SUM ( CalculatedDaysTable[DaysValue] ),
CalculatedDaysTable[equipment_qty] <= CurrQty,
CalculatedDaysTable[equipment_uom] = "Daily"
)
You used ALL on the entire table, which removes the context from all columns. I'd recommend only using it for specific columns unless you really do want to get rid of all the filtering.
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 |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
46 | |
31 | |
30 | |
18 | |
18 |