Forum Discussion
dariog
5 years agoRegular Visitor
Calculation based on filter selection
Hello Everyone, I have a problem. I have a table like the following: Location Sales North 10 South 11 West 9 East 15 I have a page filter ...
- 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.
Anonymous
5 years agoNot applicable
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.