Forum Discussion
How do I Slice and avoid filtering a measured value?
- 2 years ago
I figured this out... Rather simple fix. Instead of FILTER(ALLSELECTED(OfficeTable) it needed to be FILTER(ALL(OfficeTable).
Measure 1ALL =
VAR _unallocated_ = CALCULATE(SUM(OverheadTable[OverheadAmount]), FILTER(ALL(OfficeTable), 'OfficeTable'[Office] = BLANK()))
VAR _officename_ = SELECTEDVALUE(OfficeTable[Office])
VAR _prop_ = [%BilledAmounttoOffice]
RETURN IF(_officename_ = BLANK(), _unallocated_, _unallocated_ * _prop_)
Thanks Greg_Deckler
I have three tables. See below.
Expected output: When sliced just for "East" for example, I want to maintain that proportional amount shown in Measure 1, $202.60 and add it to the OverheadAmount, $948 for a sum total of $1150.60. If I slice just East, the $202.60 drops from the formula.
Explanation: Billings for each area divided by Total billings of all areas determine percentage proportion for each area (%BilledAmounttoOffice). Take the unallocated amount of overhead UnallocatedOverhead multiplied by %BilledAmounttoOffice to give me Measure 1. Add Measure 1 to OverheadAmount to give me Total Office Overhead (Measure 1 plus OverheadAmount) for each Office. Then I want to be able to slice it and maintain the Measure 1 plus OverheadAmount without it filtering the Measure 1.
Hope this clarifies it a bit better.
idOffice
|
idBilledAmount
|
idOverheadAmountUnallocatedOverhead
|