Forum Discussion
Filter on a calculated measure
- 6 years ago
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create two measures as below.
Result = IF( ISINSCOPE('Table'[Level2]), SUM('Table'[Value]), var dc = CALCULATE( SUM('Table'[Value]), FILTER( ALL('Table'), 'Table'[Level1]=MAX('Table'[Level1])&& 'Table'[Level2]="DC" ) ) var efc = CALCULATE( SUM('Table'[Value]), FILTER( ALL('Table'), 'Table'[Level1]=MAX('Table'[Level1])&& 'Table'[Level2]="EFC" ) ) var _0318 = CALCULATE( SUM('Table'[Value]), FILTER( ALL('Table'), 'Table'[Level1]=MAX('Table'[Level1])&& 'Table'[Level2]="0318" ) ) return dc-efc-_0318 )Visual Control = var dc = CALCULATE( SUM('Table'[Value]), FILTER( ALL('Table'), 'Table'[Level1]=MAX('Table'[Level1])&& 'Table'[Level2]="DC" ) ) var efc = CALCULATE( SUM('Table'[Value]), FILTER( ALL('Table'), 'Table'[Level1]=MAX('Table'[Level1])&& 'Table'[Level2]="EFC" ) ) var _0318 = CALCULATE( SUM('Table'[Value]), FILTER( ALL('Table'), 'Table'[Level1]=MAX('Table'[Level1])&& 'Table'[Level2]="0318" ) ) return IF( dc-efc-_0318=0, 0, 1 )Finally you need to put 'Visual Control' in the visual level filter to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , Not very clear. But you can use a measure or slicer in a new column
- Anonymous6 years agoNot applicable
Hi amitchandak ,
First of all, thank you for your help. To be more concrete: I've got a calculated measure that i'd like to use as a filter/slicer, but I can't find this function. The calculated measure within this case = Column B.
For example: From article 102408, the distribution centre sent us 54 pieces and we have booked 54 pieces. Per saldo is it 0. I'd like to net see these sentences (0, -54, 54) in my power pivot. When I filter on 0, the data presents itselves as in picture 2. I only would like to see, the mistakes, as shown in picture 3.
hopefully you can help me out!.