Forum Discussion
Calculation based on filter selection
- Anonymous5 years ago
Hi dariog ,
Create a separate table by entering data
This is the measure I created
Result = IF ( SELECTEDVALUE ( 'Table (2)'[Category] ) = "Country", CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) ), CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( 'Table', [Location] IN ALLSELECTED ( 'Table (2)'[Category] ) ) ) )Country is selected
East and North are selected
You check details from the attachment.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, dariog
Please correct me if I wrongly understood your question.
I think you can try to use something like,
if ( ISFILTERED(countrycolumn), sumofallrows, original formula)
If it is OK with you, please share your sample pbix file, then I can try to look into it to create a more accurate measure.
thank you.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.