Forum Discussion
Measure Including Extra Lines of Data
So I've come across an issue that has absolutely stumped me.
Basically I have a relatively simple measure (below) that is intended to calculate the total of the column [GBP Net] based on certain filters. Initially this calculates perfectly fine and I get the correct total. However, I'm encountering a problem when I use it in my actual report. In the report I have a slicer that allows users to filter further on the [Type] column. When I exclude a variable via the slicer, the measure doesn't exclude all of the rows with that variable, just most of them. The rows being included don't seem to have anything that links them so the issue, at least appears to be, completely random.
Hi MichaelSpence ,
Some modifications to the measure are needed to preserve the external filtering context on the type column via the ALLEXCEPT function.
Sales (no BSO D/D) = CALCULATE ( SUM ( 'Customer Slippage'[GBP Net] ), ALLEXCEPT ( 'Customer Slippage', 'Customer Slippage'[Type] ), NOT 'Customer Slippage'[Type] IN { "BSO D/D", "Credited" }, 'Customer Slippage'[Date Added] = TODAY () )
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-henryk-mstf
Community Support
Hi MichaelSpence ,
Some modifications to the measure are needed to preserve the external filtering context on the type column via the ALLEXCEPT function.
Sales (no BSO D/D) = CALCULATE ( SUM ( 'Customer Slippage'[GBP Net] ), ALLEXCEPT ( 'Customer Slippage', 'Customer Slippage'[Type] ), NOT 'Customer Slippage'[Type] IN { "BSO D/D", "Credited" }, 'Customer Slippage'[Date Added] = TODAY () )
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.