Forum Discussion
need help on filter measure
- 4 years ago
Anonymous
I wrote it according to the needs described in your sample......You didn't mention AJB4.
If you want all to show 500, you just need to truncate part of my original formula.
SUM ( 'WBS cost'[Cost] ) / CALCULATE ( SUM ( 'Allocation Key Hours'[Hours] ), ALL ( 'Allocation Key Hours' ) ),Best Regards,
Community Support Team _Janey
Hi, Anonymous
According to your requirement in the sample, you just need to modify the measure.
Like this:
rate per WBS allocation =
IF (
SELECTEDVALUE ( 'Allocation Key Hours'[Allocation Key] ) = "AJBC",
SUM ( 'WBS cost'[Cost] )
/ CALCULATE (
SUM ( 'Allocation Key Hours'[Hours] ),
ALL ( 'Allocation Key Hours' )
),
SUM ( 'WBS cost'[Cost] ) / SUM ( 'Allocation Key Hours'[Hours] )
)
Best Regards,
Community Support Team _Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more.
Hi v-janeyg-msft ,
Thanks
This seems to work on first sight, but when I filter on AJB4 it shows me 1000 which is not what I want.
As AJB4 is also linked to C.000.123 it should show an end-result of 500 (as it would need to include all hours linked to C.000.123 and therefore it should GROUP the hours of AJB4 and AJBC).
So what the measure would need to do is somehow group all allocation keys linked to a specifc WBS. When filtering on one allocation key, it should take the cost of this WBS divided by all hours of the grouped allocation keys.
so in the case of filtering AJB4, the result should be : 50000 / (30+20+50)
- v-janeyg-msft4 years ago
Community Support
Anonymous
I wrote it according to the needs described in your sample......You didn't mention AJB4.
If you want all to show 500, you just need to truncate part of my original formula.
SUM ( 'WBS cost'[Cost] ) / CALCULATE ( SUM ( 'Allocation Key Hours'[Hours] ), ALL ( 'Allocation Key Hours' ) ),Best Regards,
Community Support Team _Janey